3 ms·
Because it's hard and ultimately imperfect. Even a simple constraint as a max value (which inherently all integer values should have) requires the compiler to h
by tinco 5y ago
Because it's hard and ultimately imperfect. Even a simple constraint as a max value (which inherently all integer values should have) requires the compiler to have good understanding of the code for it to recognize explicit bounds checks on the value. If there's no explicit bounds checks it would have to prove it through inference which is often (usually?) impossible even if the compiler was smart enough to do so.
- ReleaseCandidat 5y ago> [...] max value (which inherently all integer values should have) No, they shouldn't. Would really prevent many subtle bugs if the default integers of every language would be arbitrary precision ints.
- willvarfar 5y agoPython is an example language with “big integers”. Things quickly get interesting interoperating with other languages eg via json.