18 Aug
2008
18 Aug
'08
4:52 p.m.
-----Messaggio originale----- 1) the programmer needs to know the exact range the built-in integral types cover. While this is not a big problem, the mere fact a programmer needs to know such internal details indicates a design problem of the language.
I agree completely. Also by extending the source code to more and more platforms, even future ones, you never know if your code will work perfectly.
Of course, in many cases there is no need to check a variable's range, simply because it is being used inside a very limited scope.
How many times we check the user input, the validity of a computer variable and so on? If this can be automated through a type definition then I can avoid a lot of code on a design basis.