What's your favourite tools/languages that compile into JS?

Here’s a pretty good list of them: https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS

What’s your favourite… and why?

2 Likes

Currently Svelte.

2 Likes

What do you like about it @DevotionGeo ?

There’s also a thread about it here: Svelte - what do you think about it? :smiley:

2 Likes

It’s fast, light-weight (because of the lack of virtualDOM), and simpler.

2 Likes

OCaml translates to javascript very well. It has two ways too, bucklescript, which converts the AST to javascript and thus makes much more idiomatic and readable javascript, or js_of_ocaml (jsoo), which converts the bytecode to javascript, can often be a little bit faster than bucklescript in some cases but mostly on par, however it doesn’t require the source where bucklescript does require the source, so jsoo is more ‘generically’ useful, though it does output very very low level unreadable javascript. ^.^;

Emscripten has been my main thing that’s converted to javascript to date, but nothing ‘in production’ with it, wasm is better now anyway for those kinds of things.

Purescript sounds interesting too though, but not tried it yet.

4 Likes

ClojureScript. Clojure is one of my favorite languages and my first non-trivial exposure to tools that compiled to JS happened with it (other than CoffeeScript - not a fan), so maybe I’m biased. I just can reason about things with Clojure(Script) better, it has decent interop, great React wrapper, an amazing framework and shadow-cljs <3 . YMM totally V.

5 Likes

What about ReasonML?

2 Likes

I don’t see a point of ReasonML over OCaml. ReasonML is just a string translator that translates to OCaml, it has no features that OCaml doesn’t have, and it’s syntax is longer, more wordy, and has some annoying ambiguous cases that they had to fix by making it even worse in some areas… Plus I am not at all a fan of the syntax over OCaml… >.>

ReasonML can be used with a bucklescript, jsoo, or native backends though, since it is just string translation.

Great ecosystem though.

2 Likes

Ember.js. Why? Coz discourse is built with that.

2 Likes