5 ms·
I can barely keep track of the number of languages that exist today. I feel like the answer is Wikipedia, but it would be great to have a central resource that
by mroche 3y ago
I can barely keep track of the number of languages that exist today. I feel like the answer is Wikipedia, but it would be great to have a central resource that language authors and communities could contribute to. Just answering the questions:
- What is the origin of the language?
- What use cases are the language best suited for?
- Language highlights?
- Language examples?
- Maybe language comparisons?
- flysand7 3y agoI'll reply to this comment, just in case anyone else is curious. The origin of the language: gingerBill got drunk one night and wrote a compiler. Seriously though, it was an attempt to create a language that would be a reasonable C alternative - simple semantics, usable for performance-critical applications (mainly games and engines), good support for tooling. I would also describe it close to something with underlying mechanics of C combined with the niceness of Go. Odin does improve on Go in a lot of places. The use cases would be similar to C or C++. There's not much different in the way of memory management / the way objects are stored in memory etc. There is a concept of an allocator which could make Odin a better candidate for good performance when you allocate memory (i.e. putting everything on heap can be slower than bump allocators) Some of the coolest features I've found using the language - bitsets (make a set of flags out of an enum), slices, which C didn't have but are so nice to use, the or_return, or_continue and or_break operator (hello, Go programmers, tired of writing if err != nil yet?). Language comparisons: unlike C: Has simpler syntax, easy to parse, has slices, bitsets, sized enums, templates. unlike C++: doesn't have operator overloading, has simpler semantics, the standard library is readable. unlike Rust: no borrow checker, limited lifetime checking (can detect using stack values that have dieded), no lifetime annotations, limited support for typeclasses, no pattern matching, no traits. I wouldn't compare it to Rust, honestly, it's a different kind of language. unlike Go: I haven't used Go in a while so forgot a few details, don't quote me on these: it doesn't have var syntax for declaring values, you can not shadow tuple declarations at all, support for or_return syntax, tuple returns can be used to saturate arguments of another function, doesn't have garbage collection. Doesn't have a package manager.
- gingerBill 3y agoAnd to extend to this comment, I highly recommend reading the FAQ: <https://odin-lang.org/docs/faq/ https://odin-lang.org/docs/faq/> > What is the history of the project? > The project started one evening in late July 2016 when Ginger Bill was annoyed with programming in C++. The language began as a Pascal clone (with begin and end and more) but changed quite quickly to become something else. > Bill originally tried to create a preprocessor for C to augment and add new capabilities to the language. However, he found this endeavour a dead-end. That evening was the point at which Bill decided to create an entirely new language from scratch instead of trying to augment C --- > What use cases are the language best suited for? > Odin is a general-purpose programming language with distinct typing built for high performance, modern systems and data-oriented programming. > Odin is the C alternative for the Joy of Programming. Even though Odin is a "general purpose" language, in the same vein as C, many people have been using Odin for: * Game Development * Application Development * 3D Graphics * Physics * etc