Rather define the behaviour of what happens when addition of two ints exceed the maximum allowed value.
Then by all means reject it, way better than blowing up in production.
If the language does not prevent these mistakes from happening where it would be possible to do so, isn't the language at fault?
Only yesterday I implemented this in an application, although a bit simpler (is the user < n pixels from the bottom of the document? then render more heavy stuff) so yeah, that's a pretty recurrent use case for a…
I'm curious, is there a specific use case for using such a language today? Is it just legacy?
Rather define the behaviour of what happens when addition of two ints exceed the maximum allowed value.
Then by all means reject it, way better than blowing up in production.
If the language does not prevent these mistakes from happening where it would be possible to do so, isn't the language at fault?
Only yesterday I implemented this in an application, although a bit simpler (is the user < n pixels from the bottom of the document? then render more heavy stuff) so yeah, that's a pretty recurrent use case for a…
I'm curious, is there a specific use case for using such a language today? Is it just legacy?