Hacker News new | ask | show | jobs
by paulddraper 511 days ago
I am curious as well.

Despite the "not invented at Google" swipe

* TypeScript wasn't invented at Google either, but adopted heavily.

* Angular was the first major project ever to use TS.

* And interestingly enough, Anders Hejlsberg contributed heavily to both.

2 comments

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.

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.)
There are lots of good examples of adoption despite non invention.

Ironically, Typescript is not the best one. I can go into great detail - i was overseeing production programming languages at Google at the time, but getting to Typescript (which was the right choice) took a lot.

For most things, even things that seem to be contentious in the broader developer world, internal developer infrastructure teams were often relatively agnostic on choice as long as we had the resources to do it right (IE deal with migrations, etc). You'd have to push people to be meaningfully objective in evaluations, but once they realized you were not going to let them get away with nonsense, you got reasonable evaluations and options. Not always (can't avoid zealots at this scale), but a lot of the time.

But Typescript vs Dart vs Closure (GWT and a few other things were in there somewhere, too) was just particularly contentious for $reasons.