3 ms·
Software safety is greatly impaired by type erasure: removing type information prior to execution. The safest possible arrangement is one of static checks, bac
by kazinator 10y ago
Software safety is greatly impaired by type erasure: removing type information prior to execution.
The safest possible arrangement is one of static checks, backed by run-time checks (no type erasure).
Run-time checks are simpler and therefore much less prone to false negatives: situations when an incorrectly typed operation is permitted to proceed, with various consequences: nonsensical values, corruption, crashing and so on.
The situation of a proper type exception being thrown (dynamic language) is superior to unpredictable behavior (static-only, type-erased language where the type system failed or was subverted).
Checking types and then throwing them away is like a navy using life jackets in training and then leaving them at home when embarking on the actual campaign.