by BeetleB · 8y ago · 0 comments
I recently was trying to decide which language to pick up next: Lisp, OCaml, F# or Haskell (I know a bit of Lisp and Haskell already, as well as some Standard ML).
It came down to two: OCaml and F#. The former has poor support in Windows (work machine), and the latter has less poor support in Linux (home machine). So I decided I'll probably go with F#. I've been told the syntax is quite similar, so how difficult is it to translate an F# program to OCaml. Are all the patterns the same that one can do a more or less 1:1 translation while still being canonical?
The opposite is also true, F# does not have ppx, OCaml's object system, GADTs, polymorphic variants, functors, first class modules, extendable variants.
On the other hand, F# has computation expressions (essentially extensible syntax sugar for certain kinds of operations), as well some nice extensions to the pattern match system.
That's not to say one is exactly better than the other, they just focus on doing different things.