upvote
Dart v1.0, they had nothing to do with Dart v2.0, and the change in language semantics was the main reason folks like Gilad Bracha left the team.
reply
What did they not like about the change in language semantics?
reply
Likely the focus on AOT and the sound, static type system to make that work well.
reply
Dart should have enjoyed the popularity that TypeScript received. Tough to compete with Hejlsberg though.
reply
Yeah, but Lars Bak isn't exactly a nobody when it comes to computer science either. Although I guess Bak is more famous for the implementation of programming languages than their design.

Aside: funny how Dart and TS both have Danish creators.

https://en.wikipedia.org/wiki/Anders_Hejlsberg

https://en.wikipedia.org/wiki/Lars_Bak_(computer_programmer)

reply
TypeScript is however a plain JavaScript linter, you remove the type annotations and have JavaScript, which was a consequence of the learnings versus other JavaScript wannabe replacements.

Also why after namespaces and enums, the team never introduced any other feature that wasn't also part of JavaScript standardisation process, and has since then discouraged their use.

reply
Google politics, Dart is only around thanks to AdWords team, and Flutter.

Jetpack Compose was created by Android team exactly as counter reaction to Flutter.

Go got lucky with their internal advocacy, and the push to rewrite Kubernetes from Java into Go.

Google isn't exactly known for great programming language design, contrary to runtime implementations.

reply
I may be misremembering, but my recollection is that Dart was written off in large part because of Google. Distrust with them was already high as they were abusing their dominance with things like AMP, and people felt it was a bad idea to give them even more control over the web.
reply
It also required Dartium, its Chrome based VM, and Chrome team eventually did not want to ship it any longer.
reply
I work on Dart.

A fundamental choice you have to make with a new programming language is how compatible you want it to be with existing languages and their ecosystems. Hewing closely to another language allows you to reuse and build on top of all of the code already written in that language. But it also means that you can be forced to recapitulate features from that language that aren't great. Building a new language and ecosystem from scratch lets you make a clean break from those but at the very large expense of having to build a universe from scratch.

TypeScript took the former approach. All of the world's existing JavaScript code is TypeScript too. You can freely interoperate between TypeScript and JavaScript, keep using your existing JavaScript libraries, and incrementally migrate your JS codebase to TS one file at a time.

At the same time, TypeScript inherits much of the dumb stuff about JavaScript. No real integer type, funny scoping semantics (though strict mode mostly addresses this), extreme dynamism that is hard to fit into static types. The latter is particularly important. TypeScript's type system is deliberately not sound in order to be able to mostly statically type JavaScript while allowing many of the weird and complex design patterns from that language. That in turn means that even fully typed TypeScript programs don't get the fully performance benefits of static types. That's the main reason that the TypeScript compiler itself is no longer written in TypeScript: JS is simply too slow because of dynamic typing.

Dart took a much larger step away from JavaScript. It has its own object model and runtime semantics. With Dart 2.0, it has a fully sound static type system and in 2.12 we shipped sound handling of null. Because these static semantics are fully sound, the compiler can take advantage of types to generate smaller, faster code. Performance is complex, but Dart's runtime performance is in the same bucket as Java and C#, which is about as good as a GC language can get.

The cost is that migrating an existing web application to Dart is pretty much a rewrite. It was really hard for us to get any real traction until Flutter came out. With Flutter, users are already accepting that they are writing a new app for that framework, so the hop to a new language was more manageable.

I don't know how AI affects this calculus. AI can make it much faster to automatically migrate a program from one language to another. But I think it also makes human users more conservative about which language they use. Since they aren't writing as much of the code anyway, they may have less incentive to care about using a "better" language.

I agree completely that Hejlsberg is a star and very tough to compete with. I've always thought of programming languages more as offering different ways to solve problems and less about one trying to win at the expense of another. I don't want Dart to beat TypeScript, I just want Dart to be the best it can be for what it is.

reply