How does Fable 3 stack up against ReScript or Scala.js?
Is the only difference the ecosystem around the toolchains?
Is the only difference the ecosystem around the toolchains?
F# was heavily inspired by OCaml, it was originally intended as "What would OCaml look like running on .NET?" so the languages themselves share a lot of similarities.
ReasonML pros:
- ReasonML compilation times were much faster than Fable 2, but Fable compile times weren't bad. OCaml is ridiculously fast.
- OCaml has an interesting module system that's missing from F#.
- The toolchain feels a lot more lightweight than the whole .NET toolchain.
Fable pros: - I found interop with JS and OOP stuff much easier in Fable than in ReasonML
- Fable has a tool for converting TypeScript definitions to Fable definitions - though it hasn't always worked for me for more complex type definitions
- I prefer F#'s whitespace sensitive syntax over OCaml, but that's just personal preference
- F# type providers are pretty cool
- F# has an interactive mode, and you can write standalone scripts (eg. for devops)
- If you want to write a web backend in the same language, F# on .NET is much more mature in the web space than OCaml.Computation expressions are like do-notation and list comprehensions in one feature. Now that I have tried them, I don't want to go back to a language without!
What's really cool is that things like ```async function *``` from JS can be implemented as libraries in F#.