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

AstonJ
If you had the ear of a language creator, what would you say - what could they do to make a language that you would use? :upside_down_face:
New
AstonJ
If you’re a fan, why? If you’re not fussed on it, how comes?
New
AstonJ
It’s great to see how popular some of these channels have become - do you have any favourite YouTuber devs? Ben Awad Code...
New
finner
When you are under pressure to deliver you ideally want your Pull Request to be reviewed, approved and merged as quick as possible. So do...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
New
AstonJ
Things like smart speakers (such Amazon Alexa), smart TVs or other devices with built in microphones, cameras or with other features that...
New
GermaVinsmoke
Do you like to help others on stackoverflow in your free time? And what’s your reputation on Stackoverflow? :smirk::joy::rofl:
New
AstonJ
Just listened to @rvirding’s interview here and he mentions #lua (and Luerl) - just wondered if anyone’s used Lua and what you think of it?
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
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
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
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
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
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
Maartz
Hi folks, I don’t know if I saw this here but, here’s a new programming language, called Roc Reminds me a bit of Elm and thus Haskell. ...
New
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New