
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 (
when
statements) and stress where there is not full blown compile time execution defer
statementusing
statement- The implicit
context
system 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

Thought it might be worth having a dedicated thread for standing desk treadmills (for those interested, hereās our general thread on stan...
New

Always interested in seeing what apps people use and how they organise their phones/home screens!
Hereās mineā¦
New

Example for a random image with the size of 200x300:
For a specific image:
New

The dev world doesnāt sit still, in fact it is probably one of the fastest paced industries around - meaning to stay current we are conti...
New

Things like smart speakers (such Amazon Alexa), smart TVs or other devices with built in microphones, cameras or with other features that...
New

I just switched jobs to tech lead with a small team of about 6 other developer. This is my first tech lead job. What do I need to know? A...
New

Kubernetes is everywhere. Transactional apps, video streaming services and machine learning workloads are finding a home on this ever-gro...
New

Hi folks,
I donāt know if I saw this here but, hereās a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New

00:00 The Year 2022
00:38 Web3
03:28 Metaverse
05:05 AI
06:22 Databases
07:31 JavaScript
09:58 Other Trends to Know
WDYT - what wi...
New

Iām working on a Spring Boot project and I have a controller where I want to map multiple request paths to a single method. Letās say I h...
New
Other popular topics

I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New

Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it.
Does your monitor have eye p...
New

Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that itās time I did someth...
New

Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New

Saw this on TikTok of all places! :lol:
Anyone heard of them before?
Lite:
New

Author Spotlight
Rebecca Skinner
@RebeccaSkinner
Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New

Author Spotlight:
David Bryant Copeland
@davetron5000
Weāre so happy to bring you another Author Spotlight, a series where we sit dow...
New

A Ruby-Centric Chat with Noel Rappin @noelrappin
Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New

A Brief Review of the Minisforum V3 AMD Tablet.
Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Latest in Dev Chat
Latest (all)
Categories:
Sub Categories:
- All
- In The News (10779)
- Dev Chat
- Questions (29)
- Resources (118)
- Blogs/Talks (26)
- Jobs (3)
- Events (14)
- Code Editors (58)
- Hardware (57)
- Reviews (3)
- Sales (15)
- Design & UX (4)
- Marketing & SEO (1)
- Industry & Culture (15)
- Ethics & Privacy (19)
- Business (4)
- Learning Methods (4)
- Content Creators (7)
- DevOps & Hosting (9)
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /react-native
- /textmate
- /sublime-text
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /c
- /slackware
- /julia
- /neovim