Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can I get a compile to js comparison here- if you've used more than 1

1) bucklescript 2) typescript 3) f# fable 4) scala.js 5) gopher.js 6) clojure 7) elm



What blows my mind about bucklescript is the compiled output is small and readable. Also because "it's just javascript" making it work with other javascript is much easier than with other examples. The compiler is also FAST

That experience is similar to typescript "it's just JS" except that the HM type system feels like MAGIC when you compare it to TS.

When you work with cljs and elm you need to bring in the runtime so the payloads are large. Additionally errors in prod can be opaque as the output is usually minified and barely resembles your original source. I believe there is tooling around this but it is still not the same as regular JS in that regard.

Interop between reasonml and cljs is comparable - typing reasonml can take a bit of getting used to but there are escape hatches and gradual typing to allow you to incrementally type things.

So ELI5:

type system of Elm.

Interop and "impurity" of cljs but immutability encouraged by language

"its just JS" like TypeScript

Haven't used f#, scalajs or gopher

Unfortunately, because there are many many layers of complexity which is not always easy to google or discover it can be hard to get started




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: