Remix.run Logo
bovermyer a day ago

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

sirwhinesalot a day 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 a day 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 13 hours ago | parent [-]

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

pjmlp 11 hours ago | parent [-]

That is debatable, given their customer portfolio.

dismalaf 5 hours ago | parent [-]

How is it debatable? Their products aren't games...

cygx 2 hours ago | parent [-]

Depends on what you mean by the term: Some companies are in the business of supporting game studios without being game studios themselves (eg animation companies you outsource your out-of-engine cinematics to). If all your customers are game studios, you could be argued to be a 'game (support) company'.

dismalaf 2 hours ago | parent [-]

Is Blender a game tool?

cygx 2 hours ago | parent [-]

Yes in some sense, no in others.

dismalaf an hour ago | parent [-]

Then I guess GCC is a game tool and Adobe and Autodesk are game companies...

cygx an hour ago | parent [-]

Are the majority of Adobe's and Autodesk's customers game studios? Because that was the basis of the argument that was being made.

And just to clarify, personally, I would not describe JangaFX as a game company myself (as you pointed out, they aren't in the game business per se, but the visual effects business) - I'm just trying to clarify why the claim isn't completely outlandish.

dismalaf 38 minutes ago | parent [-]

Dunno it's just weird to say you're in the business of who you sell to instead of what you sell.

A caterer that only caters to oil camps isn't suddenly in the oil business, for example. To take an easier to understand example.

Or my brother in law runs a company that does CNC machining and sells to Airbus. He's not suddenly an aircraft manufacturer, even though his parts make it onto planes.

cygx 27 minutes ago | parent [-]

Shrugs. I have no issue with someone claiming that a company making drills used exclusively for oil drilling is in the 'oil business'. However, I would not call such a company an 'oil company', so I take your point...

Terretta a day 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

Cyberdog 28 minutes ago | parent [-]

I used to be a huge fan of Swift but eventually got frustrated that they just don't seem interested in officially supporting anything other than macOS and mainline Linux; any support for BSD or Windows is only through iffy community projects. I can't recommend Swift if you want your project to be broadly multi-platform.

leecommamichael a day 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 13 hours 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 a day 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.