7 ms·
The issue with this type of promotion is that you usually want to preserve the type. Like if I add two int32s, I probably want an int32 as a result. A cooler f
by halpmeh 4y ago
The issue with this type of promotion is that you usually want to preserve the type. Like if I add two int32s, I probably want an int32 as a result.
A cooler feature would be requiring the compiler to prove the addition wouldn’t overflow.
- Sesse__ 4y ago> A cooler feature would be requiring the compiler to prove the addition wouldn’t overflow. Wuffs is specialized enough to do exactly that (https://github.com/google/wuffs https://github.com/google/wuffs).