| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
原始链接: https://news.ycombinator.com/item?id=43939520
这个Hacker News帖子讨论了Odin编程语言,它被定位为C语言的务实替代方案,并受到Pascal和Go语言的影响。评论者强调了它的简洁性、便利性和速度,尤其对游戏开发很有吸引力。Odin内置了动态数组和关联数组等功能,无需复杂的抽象。 文章将Odin与D、Zig和Rust等其他语言进行了比较。一些人认为Odin是Pascal的继承者,因为它避免了面向对象的复杂性。值得注意的是,它没有运算符重载和结构体方法。一些用户欣赏其“自带电池”的方法。一个关键点是Odin没有垃圾收集器,这与Go形成了对比。一些批评包括缺乏条件导入和无法禁用RTTI而又不影响语言可用性。一位评论者认为,与Zig的元编程重点或Rust的整体复杂性相比,Odin更适合立即使用。该语言已用于重要的商业产品,例如JangaFX。
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
You can find odds and ends of these things in other Pascal successors like Delphi, Oberon and Object Pascal. Truth is though, I never found these languages compelling. Why? Because none of them were anywhere close to being the same kind of simplicity as Pascal, and they were too wrapped up in flashy, trendy things that went out of style. Where Odin wins out is that it distinctly lacks the 90's OO craze hangover, and it never feels particularly more complicated or bloated. It's an audaciously tasteful proposition for a language. A C replacement? No, not really. But as a C++ programmer who's fed up with the lack of things like structure introspection and ergonomic sum types, I'm keeping a very close eye on Odin.
[1] - https://c3-lang.org/
[2] - https://harelang.org/
reply