Hacker News new | ask | show | jobs
by masklinn 3316 days 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

1 comments

Idris 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.

> 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.