logoalt Hacker News

jamiejquinn • today at 8:25 AM • 1 reply • view on HN

I appreciate Zig's approach, where the runtime complains when over/underflow occurs with the regular `+` operator but explicitly wraps with `+%` (or even saturates with `+|`). Takes a little getting used to (that and explicit unsigned/signed casts) but it's much clearer.


Replies

throw-qqqqq • today at 8:46 AM

Sounds quite interesting! I do prefer to be explicit in low level programming.