3 ms·
Indeed, a type system is a great tool for producing correct code, and I cannot advocate doing away with type safety. However, my counter-argument would be that
by somewhereoutth 7y ago
Indeed, a type system is a great tool for producing correct code, and I cannot advocate doing away with type safety.
However, my counter-argument would be that important failures often occur due to unforeseen interactions in complex systems, perhaps more so than due to actual defects. If a type system precludes simple solutions ("obviously no bugs"), then that may cause problems in itself.
My feeling is that type systems should be separate from the language, and should statically validate in a progressive manner (eg Typescript on Javascript). As the type system is evolved to become more expressive, the amount of unsafe code can be reduced - but never quite eliminated (if my conjecture is correct).