3 ms·
I've often seen OCaml compared to F#; as someone who knows Haskell and Rust (among others), which is better to learn? I'm not really a Windows guy, which makes
by jmgrosen 12y ago
I've often seen OCaml compared to F#; as someone who knows Haskell and Rust (among others), which is better to learn? I'm not really a Windows guy, which makes me think OCaml, but I've seen that Xamarin now works with F#, which is appealing to my inner app developer.
- chadzawistowski 12y agoF# is essentially OCaml.NET, so knowledge of either will be very transferable to the other. F# can interface with C# types, but it feels cumbersome at times. Idiomatic F# is very similar to idiomatic OCaml.
- bsamuels 12y agoI prefer F#, but only so because it has decent visual studio tooling and .net interop. F# power tools' refactoring is great, and its syntax coloring is very good as well. http://puu.sh/a1vM5/c735f3d319.png http://puu.sh/a1vM5/c735f3d319.png (i swear this looks a lot nicer on the washed out screen i program with) The interop with .net libs is helpful too - but i've found that if there's anything that's really hurting F#, it's all the OOP tacked onto it to make the .net interop work. Decent tradeoff if you ask me, but it's cringeworthy to see people using F# like an oop language when the oop only appears to be there for the interop magic to work.
- stonemetal 12y agoComparing OCaml and F# is about like comparing Java and C#. The MS languages started out very similar to the others, but made much larger strides. F# has changed their syntax to be lighter, with something similar to Haskell's offside rule. They added workflows which are monads but not quite as nice as Haskell's.
- adultSwim 12y agoMy personal preference is OCaml. One big point I would give to F# is tooling. Having a real IDE for OCaml would be nice. When I was writing OCaml I used Emacs with ocamlspotter. The other big F# feature is library support. OCaml has pretty good libraries but F# can leverage the whole .NET framework. This would be noticeable in areas like GUIs. I imagine that not using Microsoft F# would negate the benefits of F# over OCaml. To be honest, go with either. For most people the benefits come from the simple/common/old features. Once you get used to dealing with the compiler, you'll likely fall in love with ML.