3 ms·
This is an interesting point but does rely on a rather narrow definition of “type safety”. By any definition I have used, the code is type safe in those final e
by legobmw99 3y ago
This is an interesting point but does rely on a rather narrow definition of “type safety”. By any definition I have used, the code is type safe in those final examples. It has a bug, most definitely, but it isn’t type unsafe in the way that reading a chunk of memory intended to hold type A as if it was holding a type B is
- tlb 3y agoFully ad-hoc polymorphic languages like Smalltalk have this property, but many prefer having the compiler catch more errors.