This shows us how useful JS really is.
More like: "This shows us how desirable it is to try and circumvent writing JavaScript, despite how important the Web is." I'm not saying JavaScript is good or bad. Just saying that there is certainly a strong desire to not write it, as evidenced by this long list of transpile languages.
List of languages that compile to JS
31–40 of 53 posts
Re: List of languages that compile to JS
#32I'm torn between CoffeeScript and TypeScript. If there was a language that had the syntax sugar of CoffeeScript plus static typing, I would be in heaven.
Re: List of languages that compile to JS
#33Re: List of languages that compile to JS
#34At the very least I'm unsatisfied with the rationale provided in the page. Other items generally explain what makes them worthy of this list, but async.js is just, "Async utilities for node and the browser" which is, while immensely useful, doesn't change JavaScript in a way that is shared by other items on the list.
Re: List of languages that compile to JS
#35Right now I'm having a lot of fun playing with Haxe and OpenFL/Lime (formerly NME). Being able to create an app with the Flash-like API and compile it, without modifications for HTML5/Flash/Windows/Linux/Mac/Android/iOS/Tizen natively (!!) feels like some sort of unholy hack. Not to mention it's other abilities (compile to everything from JS to Java, C# and C++).
Re: List of languages that compile to JS
#36Boy am I glad I added LuvvieScript (Erlang dialect) to it last week. Its sits a bit lonely, the last transpile-to-javascript language to come in. Robert Virding of Lisp-Flavoured-Erlang pointed out that once I get it working all the other compile-to-Erlang languages (Elixir, LFE, Joxa) will also run in the browser (so no pressure then).
If you fancy developing your own transpile-to-js language I have written up the actual process in some detail: http://luvv.ie/toolchain.html Erlang (via Erlang Core) is actually quite a sweet example. Erlang (which is small) is transformed into Erlang Core (a language targetted at machines not humans) which has a very small set of primitives (21 in all). That Language is turned into a compact AST which is then transp…
Does it run on BeamJS? :D
Re: List of languages that compile to JS
#37Earlier quoted context omitted.
If you fancy developing your own transpile-to-js language I have written up the actual process in some detail: http://luvv.ie/toolchain.html Erlang (via Erlang Core) is actually quite a sweet example. Erlang (which is small) is transformed into Erlang Core (a language targetted at machines not humans) which has a very small set of primitives (21 in all). That Language is turned into a compact AST which is then transp…
Wow, I thought at first this was just making an Erlang-style syntax compile to JS, but this is much more than that. Very nice! Does it run on BeamJS? :D
So the key goal is low-impedance - the developer has a mental model where this is say a server-side process and the business rule is 'send the user a message' so they write code like:
call_user("gordon@vixo.com", modal, {"Did you brush your teeth?", {"yes", "no"}})
and the 'modal' process in my browser gets some message like: {msg, {"Did you brush your teeth?", {"yes", "no"})
It pops a yes/no dialog box and send "yes" back to the calling process on the server.Re: List of languages that compile to JS
#38Earlier quoted context omitted.
From my experience, CoffeeScript seems to be running away from the pack. ClojureScript, Dart and TypeScript all are probably leaders of the second tier, which is far and away more popular than the rest.
CoffeeScript was never part of the pack. It's older than most of these and introduced most people to the idea of languages that compile to JavaScript.
What CoffeeScript did introduce people to was the idea of a language that compiled to only Javascript. And as such, it didn't have a pre-existing language community to point out the shortcomings of the JS implementation. The problem with most compile-to-JS languages is that you never get the semantics exactly right; things like float semantics, string encodings, prototype chains etc. usually make the JS version just different enough to hold surprises for programmers used to the server-side implementation, which defeats the purpose of using the same language for both (Rhino had the same problem, which is why it took V8 before Node could really catch on). CoffeeScripters have no such preconceptions, though - it's a completely new language, so it's adopted on its own merits as a browser-side language by those who like what it provides.
Re: List of languages that compile to JS
#39I've had this discussion in other threads; but, how wise it is to use these instead of vanilla JS in a project you want contributed to? I personally find CoffeeScript very useful, and believe it's sufficiently widespread and mature as to be viable. All of these others though, I can only see it as increasing the learning curve on a project. I want to use IcedCoffeeScript (Oh, am I tired of Promises) and some of the JS…
Not sure what this means? If there is a existing project, it would probably be better to do JS. If you start a new project, or you want to change the language then you move forward with the new language and slowly replace or just keep using the old JS.
> (Oh, am I tired of Promises)
Insted of just adding Await and Defer, when you switch to ClojureScript, you will get full CSP semantics, full first class channels, essentially what Go offers on the server.
Check out this blog, it mostly talks about the difference between different ways of front end programming, callbacks, CSP and so on: http://swannodette.github.io/