admin管理员组

文章数量:1315450

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

Do you have any experience with this framework?

What about performance?

Can i use existing JS code/frameworks?

I appreciate any help.

EDIT

This is a very good scala to javascript cross piler: /

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

Do you have any experience with this framework?

What about performance?

Can i use existing JS code/frameworks?

I appreciate any help.

EDIT

This is a very good scala to javascript cross piler: https://www.scala-js/

Share Improve this question edited Mar 26, 2016 at 20:45 Alex asked Jun 21, 2011 at 14:22 AlexAlex 9,4784 gold badges31 silver badges40 bronze badges 3
  • 1 The site even mentions that it's a "proof of concept", so chances are that it's not production ready or fast. – Joachim Sauer Commented Jun 21, 2011 at 14:25
  • 1 please don't abstract javascript. it bees a nightmare if you want to interface with existing javascript code. The only successful piler down to js is coffeescript. – Raynos Commented Jun 21, 2011 at 14:29
  • I gonna try coffescript. seems pretty – Alex Commented Jun 24, 2011 at 11:26
Add a ment  | 

2 Answers 2

Reset to default 7

I did this more than a year ago. Performance is ok, but code size tends to be big. I would not remend it for production, but can give away the code if usefull. There are other efforts to run Scala on the browser. Best would be to create a JavaScript backend to an existing Scala piler.

Here are some other projects to look after:

http://greedy.github./scala/

https://github./scalagwt

https://github./alvaroc1/s2js

https://github./kripken/emscripten

http://jscala/

I've never found these "language X to JavaScript" tools to be worth using. Debugging, quality of code generation, interfacing and using native JS libraries, etc., etc. mostly get promised. CoffeeScript is an exception, because it is a new syntax for JavaScript, not an entirely separate and unrelated language.

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

本文标签: Scala to JavaScript compilation effectiveStack Overflow