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

> I'd like to hear some practical reasons for preferring OCaml over F#

Bigger native ecosystem. C#/.net integration is a double edged sword: a lot of libraries, but the libraries are not written in canonical F#.

A lot of language features F# misses, like effect handlers, modules, GADTs etc.



I did get some sense of that where F# sort of (actually is) 2nd class to C# which is slowly gaining some F# features, but F# itself isn't well promoted/supported.

As for missing language features, they can also be a double-edged sword. I slid down that slippery slope in an earlier venture with Scala. (IIRC mostly implicits and compile times).


There are libraries that simulate a lot of these things (e.g. https://github.com/G-Research/TypeEquality for GADTs). You're absolutely right that it's not as first class as in OCaml, but the tools are there if you want them.


I've written type-equality witnesses in F#, they can kinda recover type equalities (with cast methods) but not refute them, so you still need to raise exceptions for those cases.




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

Search: