2 ms·
> Fully statically typed languages put these concerns right in your face and make you think about them. That depends slightly - if your compiler uses Damas-Mil
by chimeracoder 14y ago
> Fully statically typed languages put these concerns right in your face and make you think about them.
That depends slightly - if your compiler uses Damas-Milner type inference, it's possible that the compiler will assign the most general type signature possible to your function, which will not prevent this type of error, as operations such as addition work on either integral or floating point numbers.
What you're really after is a strongly typed language that also has explicit type declarations (or a programmer that's reliable enough always to include them even when they are optional).