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

Good question. I would say the differences are:

- BuckleScript targets ES5 (+ES6 modules) directly, while Fable targets ES2015 (and beyond) and relies on Babel to transpile its result to ES5

- BuckleScript/ReasonML needs only NodeJS/npm to work for JavaScript compiles (but you can get the opam compiler/package manager if you want to do native development)

- BuckleScript/ReasonML has a more powerful traditional OCaml type system with higher-level abstraction features like functors and generalised algebraic data types, while Fable relies more on OOP for abstraction

- At the moment at least, BuckleScript's JS output is far more minimal than Fable's–try defining a simple record type like `type person = {id: int}` in both their online playgrounds to see the difference–it's pretty striking

- But Fable does have an open GitHub issue talking about minimising their output to be more BuckleScript-like, so it might catch up

- BuckleScript's JavaScript interop is just as powerful if not more, but does require a shift in thinking because its premise is to convert JavaScript idioms into OCaml idioms



Thanks for this, great explanation(and as a F# looks fair). I'll try out ReasonML one of these weekends, thank you.




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

Search: