Some thoughts on these thoughts as a beginner Zig user.
Memory / Debug mode
I found the DebugAllocator to be a really handy tool. Getting a stack trace isn’t always trivially helpful and you occasionally just have to make logical leaps to figure out the core issue, but it’s much better than “Segfault :)”.
Sure, if you’re a memory safety absolutist, then yeah, Zig is probably needlessly difficult. Otherwise, I think it’s still a decently convenient process.
Comptime
Begrudging agree. comptime is very cool for what it is, but I have occasionally felt constrained by it in a way I wouldn’t have with a proper macro system. One example is compile-time generating functions that only differ in some slight …
Some thoughts on these thoughts as a beginner Zig user.
Memory / Debug mode
I found the DebugAllocator to be a really handy tool. Getting a stack trace isn’t always trivially helpful and you occasionally just have to make logical leaps to figure out the core issue, but it’s much better than “Segfault :)”.
Sure, if you’re a memory safety absolutist, then yeah, Zig is probably needlessly difficult. Otherwise, I think it’s still a decently convenient process.
Comptime
Begrudging agree. comptime is very cool for what it is, but I have occasionally felt constrained by it in a way I wouldn’t have with a proper macro system. One example is compile-time generating functions that only differ in some slight way. As functions aren’t first-class values, your only real option is repetition.
Turns out I was merely ignorant. See this comment.
Casting
I feel this is wholly a stylistic thing. The at-sign syntax was unusual at first, but I grew to like it. It’s an (easily greppable!) sign of “hey, something important is happening here, pay attention”.
RLS
I lack the necessary knowledge to comment on this. My gut feeling is that the reason why this isn’t a hard error is erring on the side of caution to not blanket ban some potentially desirable behavior, even if I cannot think of an example.
Pointer reference optimization
I feel it’s kind of unfair to dedicate an entire section to a bug that has been removed and that it’s sad that the feature was removed, when the feature will be re-added in the future in a sound way.
Speed
IMO totally irrelevant.
Build system
Yeah, learning it was probably the biggest pain point I experienced as a beginner. The tutorials are not great and the inner workings are not trivial. Hope this will be iterated on in the future.
ZLS
The fact that it requires an extra step to work good and that this step is hidden in blogposts and a random section of the LSP’s website is a great pain and I hope in the future it’ll just work out of the box, because the difference between build-on-save-enabled and the default is earth and sky. Otherwise, it’s fine, it catches a lot of stuff that otherwise misses my attention. Could be much better, but it’s a young project for a rapidly changing language.
Warnings
I hated unused variables being errors at first, but frankly, it’s not nearly as big as an issue. You can either comment them out if they’re declared in the function or do _ = variable_to_discard and the compiler shuts up. I do think Sloppy mode would be a good addition, but there doesn’t seem to be much support behind the proposal.
My only note on the community
No firsthand experience. The support forum, hell, even the author cursed subreddit seem like fine enough places and I found a lot of helpful comments for my own issues.