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’re a fan, why? If you’re not fussed on it, how comes?
New
Exadra37
Cloudflare as workers to run serverless code without using containers: So it seems that Isolates is based on: What we ended up settl...
New
AstonJ
Thought it might be worth having a dedicated thread for standing desk treadmills (for those interested, here’s our general thread on stan...
New
jss
What do people think about Data-Oriented Programming, like this book tackles? https://www.manning.com/books/data-oriented-programming Ho...
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
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
jaeyson
Hi all, does anybody tried Shankar Devy’s Phoenix Inside Out book series? Also, will there be a big difference (aside from context prior...
New
DevotionGeo
I am planning to refresh my Ruby knowledge in a month or two, after using other technologies more frequently for a few years. Luckily I w...
New
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

axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
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
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
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
PragmaticBookshelf
Create efficient, elegant software tests in pytest, Python's most powerful testing framework. Brian Okken @brianokken Edited by Kat...
New
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
New
PragmaticBookshelf
Author Spotlight: Sophie DeBenedetto @SophieDeBenedetto The days of the traditional request-response web application are long gone, b...
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New