Is there an automatic converter of javascript code to Dart? Or is it too soon?
There's a recent tool called JSParser and does all its magic using Dart itself, that is the parser is written in Dart.
On a related noted there is Frog (and it comes with the standard SDK) which converts Dart to Javascript, it's also written in Dart making it a good showcase for the language.
Probably too soon.
I believe Dart came out earlier this week. As some of the others have mentioned, there might never be a converter for JavaScript->Dart. I asked another question if it was/will be possible to call JavaScript code from Dart, there is no official answer on this. Another thing I have heard someone ask for on Google Plus is a CoffeeScript->Dart translator. I don't know what the feasibility of this is, but would be a nice way to stick with the more traditional environments, until Dart can be adopted.
Angular 2 team is building one.
Why isn’t Angualr 2 just built in Dart?
Answer: the Angular folks want to deliver a great framework for BOTH Javascript and Dart.
Dart generates great Javascript for browsers, but we have work to do to generate reusable Javascript libraries.
The Angular team needs to generate reusable Javascript libraries.
quoted from http://work.j832.com/2015/03/angulartsjsatdartwtf.html
Their Javascript (Typescript) to Dart transpiler can be found at https://github.com/angular/angular/tree/master/tools/transpiler/src
© 2022 - 2024 — McMap. All rights reserved.
Assembly
toC
. Sure, you could do it, but good luck doing anything useful with the code at theC
level. You've lost all of the semantic information, plus you have optimizations and many ambiguities from compilation. You might as well just change the Assembly directly at that point or hunt down the original source. – Bonina