Re:What is type safety?
by AnimalMuppet on Tuesday August 05, 2014 @03:24PM
(#8138798)
In Java, IIRC, the cast fails with a ClassCastException. That seems to me to be "failure is reflected at runtime".
In C++ with RTTI, IIRC it returns null. That's also "failure at runtime" (of a sort), but you have to check it.
You have type-safe casts in Haskell, for instance, where the failure is reflected at runtime.
Those are alright.