Hacker News new | past | comments | ask | show | jobs | submit login

To someone who has a passing familiarity with OCaml, but none with F#, can you elaborate? Because I do hear the comparison frequently.

Do people just draw the comparison because they don't actually know of any other ML languages besides OCaml?




I haven't touched OCaml in a while, but the things it has and F# doesn't that I can remember include: Functors (in the ML sense), camlp4, polymorphic variant types, multiple inheritance, class interfaces.

Things F# has that OCaml lacks: Extension methods, units of measure, type providers, quotations, computation expressions, active patterns, overloading.

Probably most of the F# things could be (and perhaps have been) added to OCaml with camlp4, which is more powerful than F#'s quotations. Versus, F# may never be able to have all of OCaml's ad-hoc polymorphism features. So there's that. But I'm mainly meaning to compare what's actually built into the language.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: