HNHacker News
TopNewBestAskShowJobs

Retro_Dev

882 karma · joined May 29, 2025

Religious, Linux user, Programmer.
submissionscomments
Retro_Dev··on Low-Level Optimization with Zig
Ahh perhaps I need to clarify:

I don't love the noise of Zig, but I love the ability to clearly express my intent and the detail of my code in Zig. As for arithmetic, I agree that it is a bit too verbose at the moment. Hopefully some variant of https://github.com/ziglang/zig/issues/3806 will fix this.

I fully agree with your TL;DR there, but would emphasize that gaining the same optimizations is easier in Zig due to how builtins and unreachable are built into the language, rather than needing gcc and llvm intrinsics like __builtin_unreachable() - https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Other-Builtins....

It's my dream that LLVM will improve to the point that we don't need further annotation to enable positive optimization transformations. At that point though, is there really a purpose to using a low level language?

Retro_Dev··on Learning C3
To me it didn't really feel like C++; it is much less complicated. Could you explain more what you mean by this?
← PreviousPage 3 of 3