(no title)
bsrkf | 9 months ago
Odin is a rather simple, performant, pragmatic, procedural language, fixing especially things in C with regards to its type system and infrastructure (such as packages), adding niceties such as `defer` while being at it. I, as a C programmer, have it far higher up my list of languages to try than Zig or Rust by a rather large margin.
btw: "C alternative means a language that will last for 50 years" seems a snide that could be applied to any language less than 20 years old? I'm not sure what that's concretely meant to criticize here? Is Zig more a 50-year language than Odin, if so how? Odin is used for rather serious commercial products at JangaFX btw: https://jangafx.com/ and is quite beloved by some people using it.
James_K|9 months ago
Additionally, I don't think a C replacement should be immediately intuitive to someone who has only ever used C. To entice people away from on of the most popular and stable programming languages ever created, you must offer more than an incremental improvement. There needs to be a paradigm shift, which necessitates some degree of learning on the part of the developer.
[1] https://techtheworld.net/2024/03/06/the-nsa-list-of-memory-s...
masfoobar|9 months ago
Also the company logos on the website are under "Companies who use products by JangaFX" but it probably should be in its own section.
drannex|9 months ago
That goes for Zig as well. But, the NSA is only classifying based on most well-known languages, and additionally a lot of those aren't 'memory-safe' they just have GC, the reason they don't believe you should use C is because they don't have built in memory safety checks at all, whereas Odin does. They have Pascal on that list, which is a primary inspiration of Odin, and is also technically an unsafe language.
> By contrast the Odin presentation I saw was utterly directionless and filled with fluff.
I am not sure why a presentation has anything to do with performance or credibility of a language, plus I am always impressed by their talks. Good chance you saw their live coding/development sessions? They live stream development fairly often.
> I like to think I have a good nose for BS, and Odin trips it.
Odin is used in production, hard production today. I use it to run 6000+ retail locations doing embedded automation work in security, it's highly proficient and accessible. There is no BS here, everything has been defined and they are honest about their shortcomings when there are those (which are minimal).
> The Zig compile supports multiple codegen backends, compiling C/C++ code, and easy cross-compilation.
That's because they bundle the entirety of LLVM in their builds, they didn't do a lot of extra work for C/C++ code compilation, they just built an alias (with a set of internally defined better default flags) to the clang compiler, it's just a passthrough.
re: cross-comp: Odin is in the same boat, both Zig and Odin compile out to assembly via LLVM, they can reach the same targets practically.
> That great wall of random corporate logos of companies which don't use Odin on their website doesn't help
They do use Odin, they use JangaFX, that is less a 'this is a code written by these companies' (which some do send upstream changes, so they do) and more of a declaration of "We are used in production in these companies, you have likely ran Odin code in your favorite games, or seen in your favorite movies". That's fairly obvious for any tech-oriented project or company, especially for a language.
> Additionally, I don't think a C replacement should be immediately intuitive to someone who has only ever used C
Again, automation systems architect for one of the largest companies in the world here, I have people who have never even _programmed_ writing proficient code to use in production (after checks, of course). As an embedded developer, its insanely intuitive to C developers, and anyone who has ever programmed.
---
Check out the language, write some code, try it out, seriously, I was on the fence when I first heard about it several years ago, I think you might enjoy it. If you're not an LLM chatbot, then you might even find it invigorating to try something new. Doesn't hurt, and you learn some new things.