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
- Built-in types: strings, array, slices, dynamic arrays, maps, 128-bit integers, endian-specific integers
- Multiple return arguments
- Consistent value declaration syntax
- Parametric polymorphism
-
Compile time conditions (
whenstatements) and stress where there is not full blown compile time execution deferstatementusingstatement- The implicit
contextsystem and memory allocator system - Explicit procedure overloading
(Copied from the homepage).
Most Liked
OvermindDL1
Interesting⌠How does it compare to Zig that seems to have the same goals?
3
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.
3
kokolegorille
I also thought it looked like go
How to choose between go, rust or zig? 
3
Popular General Dev topics
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
I just watched this:
(tldr: remove bad choices so you donât need to use willpower)
It got me thinking about ways to incre...
New
Inspired by this thread about arcade games - which I initially misread as favorite arcade game soundtracks - I wanted to ask about your f...
New
If youâre a fan, why?
If youâre not fussed on it, how comes?
New
:smiling_imp:
What is your preferred syntax style and why?
Perhaps we can add examples and use the code below as a simple reference poi...
New
Hi everyone! I have been in the professional industry for ~2 years now coming from a boot camp. I started a base foundation by programmin...
New
Hello! Itâs Jay Wengrow, author of A Common-Sense Guide to Data Structures and Algorithms. My book now has a supplemental website, where ...
New
So, if we can reduce the likelihood, we can reduce the overall risk. Thatâs good. Itâs actually very similar to a very common idea called...
New
I am a Linux user since 2012, more or less, and I always use Ubuntu on my computers, and my last 2 laptops have been used Thinkpads, wher...
New
I always start with excitement and then get busy on 9/10th day. This year, like the year before this, and the year before that, I intend ...
New
Other popular topics
Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more e...
New
New
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
Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New
Small essay with thoughts on macOS vs. Linux:
I know @Exadra37 is just waiting around the corner to scream at me âI TOLD YOU SO!!!â but I...
New
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Biggest jackpot ever apparently! :upside_down_face:
I donât (usually) gamble/play the lottery, but working on a program to predict the...
New
A few weeks ago I started using Warp a terminal written in rust. Though in itâs current state of development there are a few caveats (tab...
New
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
There appears to have been an update that has changed the terminology for what has previously been known as the Taskbar Overflow - this h...
New
Categories:
Sub Categories:
- All
- In The News (10441)
- Dev Chat
- Questions (34)
- Resources (119)
- Blogs/Talks (27)
- Jobs (3)
- Events (15)
- Code Editors (59)
- Hardware (57)
- Reviews (5)
- Sales (16)
- Design & UX (5)
- Marketing & SEO (2)
- Industry & Culture (14)
- Ethics & Privacy (19)
- Business (4)
- Learning Methods (5)
- Content Creators (7)
- DevOps & Hosting (9)
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /scala
- /lisp
- /textmate
- /sublime-text
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /deno
- /django
- /revery
- /ubuntu
- /spring
- /manjaro
- /nodejs
- /diversity
- /lua
- /julia
- /slackware
- /c







