DevotionGeo

DevotionGeo

The Odin Programming Language

The Odin programming language is designed with the intent of creating an alternative to C with the following goals:

  • simplicity
  • high performance
  • built for modern systems
  • joy of programming

Example Code

package main

import "core:fmt"

main :: proc() {
	program := "+ + * 😃 - /";
	accumulator := 0;

	for token in program {
		switch token {
		case '+': accumulator += 1;
		case '-': accumulator -= 1;
		case '*': accumulator *= 2;
		case '/': accumulator /= 2;
		case '😃': accumulator *= accumulator;
		case: // Ignore everything else
		}
	}

	fmt.printf("The program \"%s\" calculates the value %d\n",
	           program, accumulator);
}

Language Features

(Copied from the homepage).

Most Liked

OvermindDL1

OvermindDL1

Interesting… How does it compare to Zig that seems to have the same goals?

DevotionGeo

DevotionGeo

I didn’t use it yet, but the first thing I noticed is syntactical similarity to Go, the short variable declaration operator, defer keyword, absence of parenthesis around conditions in conditionals, even names of the packages and methods like fmt.printf.

kokolegorille

kokolegorille

I also thought it looked like go

How to choose between go, rust or zig? :slight_smile:

Popular General Dev topics Top

AstonJ
Which screen resolutions do you frequently use? Note: not the resolution the display is capable of mind, but the resolution you’re using...
New
KyleHunter
What is a good language for beginners to make apps like snapchat and instagram?
New
andresriveros
I am currently subscribed to: The Ruby Rogues Remote Ruby Maintainable Planet Argon founder and ohmyzsh creator. https://maintainab...
New
AstonJ
If you could work on any project, what would it be? :upside_down_face:
New
jamiedumont
This is all going to be a bit hand-wavey and straight off the top of my head, so bear with me, but it’s a thought/debate that’s been ratt...
New
Exadra37
Kubernetes is everywhere. Transactional apps, video streaming services and machine learning workloads are finding a home on this ever-gro...
New
New
chaptuck
I am thinking about getting a fitness tracker of some kind (probably one from Garmin). Have any of you developed your own widgets, watchf...
New
DevotionGeo
Amazon CodeWhisperer is an alternative to GitHub Copilot, and it’s free!
New
Margaret
Hello DevTalk Community! Once again, The Pragmatic Programmers are looking for developers who’d like to help shape the future of our boo...
New

Other popular topics Top

AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New