Hacker News new | ask | show | jobs
by eseidel 505 days ago
Typescript is great! But doesn't get you away from running in a JS interpreter or JIT, which at least on iOS is very slow. We wrote the first 3 versions of Flutter in JS but eventually had to move off due to 10s+ startup times (we wrote a ton of JS). Once we moved to an ahead-of-time compiled language we could write as much code as we wanted and the user didn't have to compile it during launch on their device. Typescript would have that problem still today, sadly.

https://www.youtube.com/watch?v=xqGAC5QCYuQ is a talk where we discuss what led to modern Flutter (including 3 attempts in JS).

Angular was originally in Dart is my understanding, but eventually forked into two projects. Angular Dart (which is really only still used internally at Google, mostly for Google AdWords which makes all the money) and Angular JS which is what has seen so much popularity more generally.

2 comments

These days Hermes is the answer to the JS and iOS startup issues. Of course it's a decade too late for flutter. :P

https://github.com/facebook/hermes

https://x.com/tmikov/status/1869945330638442651

Btw that Angular history is backwards. The first versions of angular were written in JS back in ~2009. jQuery was the most popular way to build web apps, and Angular provided a (very fancy) declarative data binding framework over it. Everything ran in your browser by inspecting DOM attributes.

Later in ~2014 they built a new framework on similar principles in TypeScript, but with an AOT compiler and called it "Angular 2". Then they retconed the original framework "AngularJS" and made the 2+ framework be just "Angular". In that era some Ads folks forked the Angular 2 framework and rewrote it in Dart and the two frameworks evolved separately since.

So there's really 3 separate "angular" frameworks...

Sorry, I was unclear. I didn't mean to necessarily suggest TS as a candidate for Dart's goals. (Though there is STS...)

I meant to point out that you can't just assume a priori it was NIH syndrome, as Google's heavy adoption of TS is a counterexample.

Makes sense. Google is a very large and diverse place. (And sometimes a lot of unpleasant infighting and politicking around tech choices.)