5 ms·
What is "optimality", described as one of the three primary goals of the language? Zig is intended to be "optimal" in what dimension?
by hathawsh 7y ago
What is "optimality", described as one of the three primary goals of the language? Zig is intended to be "optimal" in what dimension?
- dinglejungle 7y agoFrom the Documentation page[1]: > Robust - behavior is correct even for edge cases such as out of memory. > Optimal - write programs the best way they can behave and perform. > Maintainable - precisely communicate intent to the compiler and other programmers. The language imposes a low overhead to reading code and is resilient to changing requirements and environments. [1] https://ziglang.org/documentation/master/ https://ziglang.org/documentation/master/
- hathawsh 7y agoThanks. Based on that definition of optimal, it sounds like Zig intends to be optimally predictable and performant. Other languages would define "optimality" differently: Python aims to optimize readability, Lisp aims to optimize expressiveness, Erlang aims to optimize availability, and so on. I don't mean to nitpick, but choosing an excessively general term as one of the three primary goals seems like a missed opportunity to focus the Zig language community on specific goals.