4 ms·
The decision between structural and nominal typing has nothing to do with whether you retain type information at runtime. TS could have just as easily chosen n
by mason55 2y ago
The decision between structural and nominal typing has nothing to do with whether you retain type information at runtime.
TS could have just as easily chosen nominal typing + a simple way to do typedefs and had everything else work like it does now. But structural typing gives you a lot of other useful features.