4 ms·
Structural is worse than nominal. The types are unsound even without "any" because arrays are bivariant. There are no HKTs.
by lmm 11y ago
Structural is worse than nominal. The types are unsound even without "any" because arrays are bivariant. There are no HKTs.
- spion 11y agoStructural is not worse than nominal. Nominal types are mostly a lie, and in the case of JS and package managers / module systems like npm / node's, they are a non-starter. Arrays are no longer bivariant, and haven't been for at least a year. They are still covariant unfortunately.