Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

odin

< >

odin is a programming language created in 2016.

#100on PLDB 8Years Old 417Repos
Download source code:
git clone https://github.com/odin-lang/Odin
Homepage · REPL · Source Code · Docs

Odin Programming Language


Example from the web:
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); }
Example from Riju:
package main import "core:fmt" main :: proc() { fmt.printf("Hello, world!\n"); }
Example from hello-world:
package main import "core:fmt" main :: proc() { fmt.println("Hello World"); }

Language features

Feature Supported Example Token
Strings "Hello world" "
Print() Debugging fmt.println
Comments // A comment
Line Comments // A comment //
Semantic Indentation X

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v164.7.0