> But it doesn't : if it can't prove the range validity at compile time, it
> plants a runtime check - which fails AT - not after - runtime. Failure
> should occur after the expression is calculated but before the assignment
> takes place.
You say that there is no need to make any checks at compile time since
strongly typed runtime prevents us from making an incompatible
assignment. This is not what I call a "strongly typed" system. By
strongly typed I mean not detection but prevention of incompatible
assignments. Am I wrong?
I recall those annoying "outside the range" simulator-firing errors.
Surprisingly, I have never mentioned anything like this in another
strongly typed system - Java. The fact that I can assign a short to into
in java means that short is a subtype of int. Yet, when I assign an
"int"-producing expr to a "short" value, compiler asks me to infer an
explicit cast that prevents errors happening at runtime. Might be this
is because Java follows the following rule that I see in Wikipedia:
Strongly typing means
*Omission of implicit type conversion*, that is, conversions that are
inserted by the compiler on the programmer's behalf. For these authors,
a programming language is strongly typed if type conversions are allowed
only when an explicit notation, often called a cast, is used to indicate
the desire of converting one type to another."
One of the rules says that "Static typing is often confused with Strong
Typing". Dear, it seems to be my case