| Something I don’t get. Odin doesn’t support closures (a la C++ or Rust) The thing is, I don’t understand why. Odin’s FAQ says it’s because closures require automatic memory management. [0] But if that’s the case, why do languages like C++ and Ada [1] support closures? [0] https://odin-lang.org/docs/faq/#does-odin-have-closures [1] https://learn.adacore.com/courses/advanced-ada/parts/resourc... |
The answer in the Odin FAQ maybe could be expanded to say "many uses of closures require automatic memory management, and while Odin could add some kind of support for closures to handle the uses that don't, it'd add too much complexity and too much potential for bugs to be worthwhile". Not to speak for gingerbill, here.