Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a converter of Javascript to Dart?

Is there an automatic converter of javascript code to Dart? Or is it too soon?

like image 465
ripper234 Avatar asked Oct 10 '11 23:10

ripper234


2 Answers

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.

like image 103
Chris S Avatar answered Oct 04 '22 01:10

Chris S


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.

like image 44
TMB Avatar answered Oct 04 '22 00:10

TMB