I am starting to learn F#. I am well versed programming languages like C# (and using the .NET framework in general), but functional programming is new to me. The way I learn best is by taking a book about the subject and starting to read – so I grabbed a copy of “Expert F#” and “F# for scientists”. A few times I got the impression that those books seems already to be outdated due to recent changes in the language – nothing too dramatic, but it gives a bit of a nagging feeling that there may be more.
Now that F# 2.0 seems to have stabilized, it would be nice to see how the ‘real’ F# has turned out compared to the versions of the language described in those (and similar) books.
So my questions are:
- what topics have changed since the books were printed, and are no longer valid as described? Are ther any chapters I can skip completely? (I am aware that some functionality has been moved to the the PowerPack, though it is not totally clear to me which functionality is in the PowerPack, and which is in the standard install)
- what features of the language are described correctly, but have newer alternatives available? (Is the description of events still up to date?)
- which features of the language I should be aware of that were added (or modified) since those books were written?
- are there other recent changes in the language that I should be aware of?
edit:
Thanks all for the answers!
As far as release notes go, I was able to dig up the following “detailed release notes” posts on Don Syme’s blog, applying to versions of F# after 1.9.2 (the version “Expert F#” mentions as being the version used in the book):
- Versions 1.9.3.7 and 1.9.3.14
- Version 1.9.4 and 1.9.4.19
- Version 1.9.6 (September 2008 CTP)
- May 2009 CTP (“Beta 1”)
- October 2009 (“Beta 2”)
- 2.0 RC (February 2010)
I didn’t find anything about version 1.9.5 – did that one ever exist?
I probably can’t give a complete answer, but here are some things that come to mind as having undergone non-trivial changes in the past two years I’ve been working on F#…
Minor changes:
renamed. There originally was a penchant for underscores that has
since been removed to be more
.Net-like. So e.g.
Seq.to_arrayisnow
Seq.toArray. Some significant changes toasyncand quotations APIs too.#lightis now the default, you can quit putting it at the top of every file[<OverloadID>]to make overloaded member functionsNew features:
comparisonandequalityconstraints were new in Beta2.unmanagedconstraint in RC.