Odin | |
---|---|
Paradigms | imperative, procedural |
Designed by | Ginger Bill |
Typing discipline | Static, strong, inferred, structural, generic |
Platform | x86-64, ARM |
OS | Cross-platform |
License | BSD-3 License |
Filename extensions | .odin |
Website | odin-lang |
Influenced by | |
C, Pascal, Go, Rust |
Odin is a general-purpose programming language with distinct typing, built for high performance, modern systems, and built-in data-oriented data types.
Examples
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)
}