Scala to compile JavaScript efficiently?

I just read about java 2 javascript parser and demo with scala.

Do you have experience with this infrastructure?

How about performance?

Can I use existing JS code / frameworks?

I appreciate any help.

EDIT

This is a very good scala for the javascript cross compiler: https://www.scala-js.org/

+7
source share
2 answers

I did it over a year ago. Performance is fine, but code size matters a lot. I would not recommend it for production, but can give away the code if it is useful. Other attempts to run Scala in a browser. It would be best to create a JavaScript backend for an existing Scala compiler.

Here are some other projects you need to complete after:

http://greedy.github.com/scala/

https://github.com/scalagwt

https://github.com/alvaroc1/s2js

https://github.com/kripken/emscripten

http://jscala.org/

+7
source

I have never used these "JavaScript X language" tools that are worth using. Debugging, quality of code generation, interaction and use of own JS libraries, etc. Etc. In most cases, they are compromised. CoffeeScript is an exception because it is new JavaScript syntax, and not a completely separate and unrelated language.

If you need to use JS (or another language, for that matter), hug him and learn it.

+2
source

All Articles