3 ms·
Because TypeScript's type system is (by design and for good reason) unsound, an AOT compiler can't rely on static types to generate smaller more efficient code.
by munificent 5y ago
Because TypeScript's type system is (by design and for good reason) unsound, an AOT compiler can't rely on static types to generate smaller more efficient code. It's always very hard to compile a dynamically typed language to fast code than it is a statically typed language.
Dart (as of 2.0) has a sound static type system. It's just an easier language compile well.
- wiseowise 5y agoDart didn't have sound static type system when Flutter was created.
- munificent 5y agoEven before that, Dart was easier to compile efficiently than JavaScript because classes are purely declarative and all objects have a fixed field layout.