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

odin

< >

odin is a programming language created in 2016.

#98on 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
View source
- Build the next great programming language · Add · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements · Part of the World Wide Scroll