admin管理员组文章数量:1419244
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
本文标签: Scala like alternative to JavaScriptStack Overflow
版权声明:本文标题:Scala like alternative to JavaScript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745301298a2652386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论