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:

Where Next?

Popular General Dev topics Top

Rainer
Have you seen the new features that will be available in the upcoming C# 9 release? C# is taking a lot of input from functional l...
New
AstonJ
Looking at @siddhant3030’s photo from the Do you blog? thread, do you cover your computer or phone camera as a security precaution? Wha...
New
Exadra37
So, if we can reduce the likelihood, we can reduce the overall risk. That’s good. It’s actually very similar to a very common idea called...
New
AstonJ
Great paper by Igor Kopestenski on Erlang and GRiSP: Erlang as an Enabling Technology for Resilient General-Purpose Applications on Edge ...
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
OvermindDL1
What shell(s) do you use, why do you use them, and how do you have them configured? Note, this is about shell’s, not terminals, terminal...
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
Exadra37
Your users of the two forums are spread across the world, thus I am curious how did you solved it?
New
DevotionGeo
Amazon CodeWhisperer is an alternative to GitHub Copilot, and it’s free!
New
ivanhercaz
Hi! I usually keep changelogs for my projects because I think they are really useful, not only to track the changes and not to be lost b...
New

Other popular topics Top

AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
mafinar
This is going to be a long an frequently posted thread. While talking to a friend of mine who has taken data structure and algorithm cou...
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
New
AstonJ
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New