Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Dart didn't have sound static type system when Flutter was created.


Even before that, Dart was easier to compile efficiently than JavaScript because classes are purely declarative and all objects have a fixed field layout.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: