Is there any Scala like alternative to JavaScript? I'm looking for language with:
- Embeded XML
- Better standard library than classic JavaScript
- Implicit Conversion
Is there any Scala like alternative to JavaScript? I'm looking for language with:
- Embeded XML
- Better standard library than classic JavaScript
- Implicit Conversion
- 1 I guess he meant implicit conversion – Ben James Commented Oct 17, 2011 at 20:36
- 2 Where do you want to run that code ? Browser, server, desktop, toaster ? – nos Commented Oct 17, 2011 at 20:36
- In a browser. This language should have DOM support – Mateusz Commented Oct 17, 2011 at 20:38
- 2 That means that at the end of the day you'll have to produce . Also note that user-defined implicit conversions (unless intended to be fully dynamic, which introduces notable overhead to pretty much every operation everywhere) require a static type system. – user395760 Commented Oct 17, 2011 at 20:40
- 3 Some typed alternatives in that list: github./jashkenas/coffee-script/wiki/… – Debilski Commented Oct 18, 2011 at 0:44
5 Answers
Reset to default 4There is a project "Scala+GWT" that piles Scala -> a GWT intermediate target. GWT then presumably piles it to JavaScript. http://scalagwt.github./
Not truly matching your requirements, but answering your initial question "Is there any Scala like alternative to JavaScript? ":
If you do not like Ruby/Python/Coffescript, you should perhaps have a look at the technology preview of google's new language Dart: http://www.dartlang/
Looks very java-ish on a first glance, but has many niceties that make it feel scalastic too. (But do not make the mistake to approach it as another Scala. Only Scala is Scala!)
I think the best you're going to get is something like CoffeeScript, which ultimately piles to JavaScript. AFAIK, browsers don't have any other cross-browser client-side language with DOM support.
There's also a Fantom language. On the main page of its site which it says: Write code portable to the Java VM, .NET CLR, and JavaScript in the browser.
Scala.js
might be what you are looking for:
"Scala.js piles Scala code to JavaScript, allowing you to write your Web application entirely in Scala!"
Site: http://www.scala-js/
Github: https://github./scala-js/scala-js
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745301298a4621450.html
评论列表(0条)