Re:Dart added support for cross-compilation
by flohofwoe on Monday May 12, 2025 @08:58AM
(#43962420)
Agreed for enabling gradually adding types to large JS code bases, but at the same time it's also used for very questionable 'template metaprogramming hacks' (which then result in pages-long and completely undecipherable error messages). It's a very similar problem to 'abusing' the C++ template system.
Eh, people critique the kitchen sink type system but at the end of the day that system is why TypeScript took over, not a weird add-on you have to put up with to get it. It's what makes it possible to assign comprehensive types to ~every JS library, which is what allows TypeScript to gradually eat the whole JS ecosystem.
Any other approach stops short of the goal of being JS+Types, which means you end up with a different language with different semantics, which is where Dart failed.