DEV Community

Discussion on: Angular Apps in TypeScript or Dart?

Collapse
 
stormingorman profile image
Brian Gorman

Dart is a much superior language to Typescript from an OOP perspective but also, and maybe more importantly, because of their collection and stream api. Also, dart has a lot of the niceties found in modern languages like optionals and class-as-interface ..

The interoperability between Typescript and Javascript is one of the biggest weaknesses of Typescript in my opinion. A lot of the main problems of javascript can bleed through and coexist with typescript. Not unlike how C-code is also valid inside of C++ code .. and C++ suffered from the same low level caveats found in C.. It was a mistake to try to put OOP on-top of C and it is still a mistake to put OOP on-top of JS... But they did it for the same reasons.. you can use all your old C libraries ! Code is much more stable and cleaner if these low-level problems are abstracted away. With a strongly typed language with optionals, bugs and crashes can often be discovered at compile time. And as you point out, the async support is first class.

Dart's functional support is awesome... its Collection API and optionals makes it where you rarely need to ever explicitly write an if statement or a for loop.. It is strongly typed with many of the bells and whistles of modern languages like Swift and Kotlin. I've developed client and server side code with both typescript and dart and in my view there is no question which is the better language.