by camus2 · 13y ago · 0 comments
Dart not so much since the semantics are different.You can still interact with JS libs but it's not as straight foward as TS.
I tested a number of options (GWT,Haxe,CS,Dart,Opal,Jsx,...),while i'm not a Microsoft fan(by a long shot),Typescript is the solution that allows the best integration with legacy code and pure JS libraries,while making easy to port old java/C#/as3 code to JS.
Dart actually has horrible semantics in places. Only if x === true will if(x) run.
The type-checker will give a very clear warning if it catches you putting a non-bool in a conditional context. And make no mistake: the type checker is an important part of the Dart development process.
(One downside of this is that it does push you to working in the -- Eclipse-derived -- DartEditor, which isn't always a wonderful experience. However, the type checker is exposed and available, and there's nothing to prevent it being tightly integrated into other editors or IDEs.)
[1] And as a practical matter generates faster code, because it can be implemented with a comparison against a single constant.