Remix.run Logo
pjmlp a day ago

I kind of like Odin, with its Pascal/Modula-2 influences, even if the community is a bit hardcore on some of their ideas.

Love the books in the background, and the whole video.

It is also nice that Odin takes the batteries included approach.

How well it would fair in the mainstream remains to be seen.

bovermyer 19 hours ago | parent | next [-]

What kinds of project would Odin be best suited for, as compared to, say, Rust or Go?

sirwhinesalot 16 hours ago | parent | next [-]

By far the best feature (IMO) is that it has no trouble talking to the most important Windows COM libraries (like DirectX) and the Objective-C runtime (for Metal), and this comes as "batteries included", not some random third party library you have to download.

So for any sort of visual engine development (game engines being the most obvious, but also applications like blender or the JangaFx suite which is the main user of Odin), it is great. What you need is just there ready to go.

The language design itself is very much oriented around appealing to people who do this sort of work.

Other than there isn't much to the language really. It lacks a "big idea" feature like Rust's lifetimes or Zig's comptime. The closest thing to a "big idea" is the rejection of package managers but that's not really part of the language.

It's pleasant to use and compiles fast. Hard to complain.

pjmlp 18 hours ago | parent | prev | next [-]

Game development.

Go really only took off thanks to Docker and Kubernetes, and even if it would be capable, there is hardly an ecosystem there.

Rust could be there, but there is really only Bevy, and several companies have tried it and pivoted to something else due to compile times hindering fast prototyping workflows.

Odin was created at a games company, JangaFX, and has already a few products using it.

https://jangafx.com

Also Odin batteries include what you need to start coding a game right away, https://pkg.odin-lang.org/vendor

dismalaf an hour ago | parent [-]

JangaFX isn't a games company. They make visual effects tools and are probably best known for their fluid simulations.

Terretta 11 hours ago | parent | prev | next [-]

At the level of this question, with most responses addressing Odin versus Rust or Go as in the question, I'd have been curious for community thoughts adding in Nim and Swift (now that Swift is on Linux and in any IDE that can use SourceKit-LSP).

https://www.swift.org/install/linux/

See:

"A series of small programs/tasks to compare C++, Go, Zig, Odin, D, Janet, Swift, Nim and C# to see which I like the most"

https://github.com/phillvancejr/Cpp-Go-Zig-Odin

leecommamichael 18 hours ago | parent | prev | next [-]

Interactive applications where a GC is not an option.

Rust is shockingly good at being a general purpose language, but that's in the face of the strict semantics of the language and approach to memory. There became a comparison against Go because Go offers strong performance and a complete opposite memory-management experience (in having a GC that largely solves it for you.) Odin sits between these two levels of friction, leaning far more on the Go side of things. There are goodies in Odin which make memory management much breezier than other manual languages, but I'll admit it is still a task you are expected to complete.

So that's the story on the memory-management effort. That aside, I'd say Odin is best for interactive applications where a GC is not an option. Although at this point it comes out of my hands so easily that I'd probably write Odin in some situations where it'd be less optimal, and it'd be fun so why not?

dismalaf an hour ago | parent | prev | next [-]

Anything you'd use C or C++ for. Graphics, finance, simulations, native GUI apps, command line tools, etc...

Semantically it's quite C-like, but it's got some nice modern features like a real module system (Odin calls it packages), a project-aware compiler (no build system needed, just run "odin build ." in your project root), fast compile times, and some nice quality of life stuff (good string type, good maths library, built in array maths, some nice built in stuff for memory management). It's also fast. Like in the same ballpark as C, C++ or Rust.

It's basically a modern C replacement.

casey2 18 hours ago | parent | prev [-]

Game engine programming, more generally projects where the programmer controls the spec and data. More specifically, passing custom allocators to specific subsystems.

That may sound like "Q:why buy this truck? A:Cos it has a nice oil filter" but it marketed as a language "[for the] joy of programming".

Perhaps the goal is to get more people into programming following the same playbook as the scripting wars we had in the 2000s. Or it's part of a larger trend to get mind-share away from c.

baranul 16 hours ago | parent | prev [-]

Odin is not the only language with Pascal influences, as that applies to Golang and Vlang too.

pjmlp 14 hours ago | parent [-]

Sure, but at least Odin embraces more stuff than Go, with its design mindset.

It has naturally the influences that came via Oberon-2.