Hacker News new | ask | show | jobs
by ms013 2665 days ago
F# is extremely similar. To put it in perspective how similar, I just ported a project for work over from F# to ocaml in a few days - mostly adding "in" for let blocks and parenthesizing nested match blocks where necessary, and replacing data structures with their ocaml equivalent. Large chunks of that code base didn't require any modification - I'd drop a 500 line source file in, run it through the ocaml compiler and have to deal with a handful of syntax tweaks to make it go through.
2 comments

Which would you recommend from an ecosystem/performance perspective?

I’m thinking hard about picking up a new language and I think it’ll be oCaml, but F# does have the .net ecosystem behind it... how is ocaml’s stdlib? Is it easy to find what you need in 3rd-party modules?

F# for ecosystem. Most stuff you’d need is available via nuget. Plus, interop with C# is trivial, so all of that ecosystem is there too. Ocaml has opam for package finding, but it’s a bit sparser.

That said, I don’t tend to use a huge number of 3rd-party modules, so it’s not a big differentiator for me. Too much of a liability to have dependencies on some rando from the internet: for work, we tend to stick to modules from trusted sources in the rare chance we use them (eg, Jane street).

I apologize for not being clear. Which one expresses functional paradigm more?