Hacker News new | ask | show | jobs
by ZenoArrow 4257 days ago
I'm learning F# right now, it's flipping excellent! From what I understand it's similar to Ocaml, but has some other features that give it the edge (for me at least).

I did try to learn Ocaml at one point, but I was put off by the standard library variation (the default one apparently has numerous shortcomings, Batteries project extends it and Core project aims to replace it, but neither one is the clear winner) and the lack of extensive parallel processing support (coming soon... https://www.youtube.com/watch?v=FzmQTC_X5R4 ).

F# comes with a sensible default library (including Unicode support as default), some nice syntactic sugar (the pipe forward operator is especially useful, and to be fair it has made it into Ocaml now too... http://stackoverflow.com/questions/8986010/is-it-possible-to... ), seamless interoperability with all .NET libraries, and parallel processing is made comparatively easy (for example, if performing a map operation over a list, can just change the List.map function to Parallel.map to get the parallel version).

This is probably the F# introduction I would recommend the most (it's a video, which I know isn't ideal, but it's a good one): http://channel9.msdn.com/Blogs/pdc2008/TL11

Oh and type providers in F# blew my mind! I can't really summarise them yet, but imagine being able to mix Python or R or many other data sources in with F#. If anyone has a good introductory post on type providers, please feel free to share.

1 comments

Thanks a lot for these infos! Unfortunately F# is .NET only. Linux requires Mono for installation which means a lot of dependencies. I prefer small efficient solutions (Nimrod for instance). OCaml works out of the box on my system.
OCaml is nice too, it's just not for me. If you like OCaml you should definitely check out Mirage OS, it will fit into your small efficient systems ethos nicely... http://www.openmirage.org/
Rare language has both .Net and JVM support, probably only Clojure now. On the upside you can build iOS and Android apps using F# plus many other gaming platforms.
Clojure is far from the only language that supports both the JVM and CLR. I had a long reply ready, but I lost it. Off the top of my head the languages that have support on both (aside from Clojure) are; Python, Ruby, JavaScript, Java (though J# is being depreciated), Scheme, Common Lisp, PHP, Perl 6, Prolog, Pascal, Ada. I might be missing some.
That's impressive, but I kind of dismissed some of them as scripting languages.