4 ms·
The author hand waves away ReleaseSafe, but does not really seem to understand its usage. I don't think zig best-practices are written in stone yet, but I woul
by jmull 1y ago
The author hand waves away ReleaseSafe, but does not really seem to understand its usage.
I don't think zig best-practices are written in stone yet, but I would expect ReleaseSafe to be the default in production. Since zig allows turning off/on safety checks on a per-block basis, you only need to pay as much of a performance cost as you want for this.
Actually, this doesn't really come across as a sincere critique of zig. It's more like how a sport fan talks about a rival team (I guess the author must be team Odin). The "first impressions" section is silly.. of course you don't understand how it all works before you've learned anything about it. It might be a bit confusing and have some new patterns. And yes, all the options of the advanced build system is complex, but... you can use the simple build mechanism, or just go with the template for that matter.
Myself, I think there are certainly valid criticisms of zig to make and I don't know if it's ultimately going to amount to something, but you've got to have some knowledge of the subject and not come at it with a predetermined conclusion.
- dmit 1y ago> I don't think zig best-practices are written in stone yet, but I would expect ReleaseSafe to be the default in production. Which profile is the default for the Zig compiler itself? What about Bun? TigerBeetle was the only one of the three to use ReleaseSafe by default last I checked? (Edit: in fact, they outright ban ReleaseFast and ReleaseSmall because they care about correctness.) ZLS suggests ReleaseSafe in its README too, if you count it among the prominent Zig projects.
- kristoff_it 1y agoZig ships release fast but there's an accepted proposal (not implemented yet) to change unstable builds to be release safe.
- dmit 1y agoYou mean the official nightlies? I like that plan! Should boost coverage by a lot in irl projects.