3 ms·
I don't agree at all about "not much safer" and Zig differs from C in so many ways -- including but not limited to safety -- but regardless, memory safety comes
by pron 4y ago
I don't agree at all about "not much safer" and Zig differs from C in so many ways -- including but not limited to safety -- but regardless, memory safety comes at a price, language safety is not an end (that would be program correctness) but just one of many means to that end, there is no consensus at all over what is the most effective way to reach that end, and there are other things people care about as well. So your very question is the wrong one. You're both setting an absolute priority as well as the best way to achieve it when there's no consensus over either one of these.
Put another way, the answer to your question is because even if program correctness were the only value that matters to anyone who does low level programming (and it isn't), there's no agreement sound memory safety in the language -- at least the way Rust does it -- is the best way to achieve correctness. Put yet another way, the answer is: for the same reason people would want to use a language with memory safety -- because they think it helps them achieve their goals better.
- pjmlp 4y ago
- pron 4y agoI think it is a big improvement, on the axes that matter most for low-level programming. In fact, Zig is so revolutionary (rather than evolutionary) that its power is sometimes missed on first glance.
- pjmlp 4y agoIf we look from the point of view of comptime and having a more curly friendly syntax for C folks, maybe.
- pron 4y agoSure, comptime, comptime introspection, comptime type generation, incremental compilation, basically the most important things for low-level programming.
- pjmlp 4y agoMany low level programming languages don't have them, including C, so while a nice feature, I don't see it as a killer feature, more like a nice to have.
- pron 4y agoC doesn't have the abstraction abilities of languages like C++ while Zig does, thanks to this feature. This is more than an exponential increase in expressivity (i.e. there are Zig programs that would take exponentially more code in C).
- deleted 4y ago[deleted]
- msla 4y agoWhy does the staff allow this racist troll to continue to post?