DevotionGeo

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

(Copied from the homepage).

Most Liked

OvermindDL1

OvermindDL1

Interesting… How does it compare to Zig that seems to have the same goals?

DevotionGeo

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.

kokolegorille

kokolegorille

I also thought it looked like go

How to choose between go, rust or zig? :slight_smile:

Popular General Dev topics Top

AstonJ
Thought it might be worth having a dedicated thread for standing desk treadmills (for those interested, here’s our general thread on stan...
New
AstonJ
Always interested in seeing what apps people use and how they organise their phones/home screens! Here’s mine…
New
New
AstonJ
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
AstonJ
Things like smart speakers (such Amazon Alexa), smart TVs or other devices with built in microphones, cameras or with other features that...
New
ohm
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
Exadra37
Kubernetes is everywhere. Transactional apps, video streaming services and machine learning workloads are finding a home on this ever-gro...
New
Maartz
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
AstonJ
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
harwind
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 Top

DevotionGeo
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
Exadra37
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
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New