3 ms·
Zig handles this with lazy compilation: code is parsed, but not even type checked, until the compiler reaches it. This can lead to the occasional rude surprise
by samatman 2y ago
Zig handles this with lazy compilation: code is parsed, but not even type checked, until the compiler reaches it.
This can lead to the occasional rude surprise when finally reaching code I've been working on for awhile, but haven't yet connected to the rest of the project. But it means there's no need for tree shaking, because nothing gets in until it gets used. One of my favorite things about the language.
- ArtixFox 2y agoits such a useful technique. tiny binaries ftw!!