Re:Zig's Comptime Is Bonkers Good
by _aavaa_ on Wednesday January 08, 2025 @09:50AM
(#42634812)
> In an ideal world, a function that only works for small integers would bake that into its type system. Ie, rather than accepting “any integer”, the function would accept a u8, or a value compile-time guaranteed in the range of 0..10 or something.
Ada takes this approach.