3 ms·
Seems to be at runtime so, so almost every language for bounds checking. Overflow checking is a bit more rare: * Swift has it by default (error) * So do Pyth
by masklinn 10y ago
Seems to be at runtime so, so almost every language for bounds checking.
Overflow checking is a bit more rare:
* Swift has it by default (error)
* So do Python, Ruby, Erlang (promotion to arbitrary precision)
* C# has an optional Checked Context though I don't know how common it is
* Rust has checked operations (opt-in, both error and saturating), will check (error) by default in debug mode, it can optionally check (error) in release mode
- weavie 10y agoIdris has compile time bounds checking. It is a pretty special case though, you have to jump through a number of hoops using dependent types to get it.
- masklinn 10y ago> Idris has compile time bounds checking. Indeed it does, but I'm guessing it doesn't come close to qualifying for "widely adopted language", my list is already stretching it.