Cross posted from blogs.msdn.com
The F# team are thrilled to announce that Visual Studio 2010 Beta1 is now available , including the latest version of F#. Today we are also releasing a matching F# May 2009 CTP for use with Visual Studio 2008 (MSI, ZIP). Further below is a screen shot, more here.
If you’re new to F#, consider watching the PDC presentation on F# by Luca Bolognese, and the live demo of F# and other new language technologies at JAOO by Anders Hejlsberg, Where are Programming Languages Going, or else download, start playing and take the MSDN walkthrough of F# in Visual Studio 2010.
This release is a landmark in the process of making F# a language officially supported by Microsoft, being the first release where F# installs as part of Visual Studio 2010. Using Visual Studio 2010 you can build F# applications for .NET 4.0 Beta1, which has been released today. Likewise, using the F# CTP Update for Visual Studio 2008, you can build F# applications for .NET 2.0/3.0 and 3.5. The F# language itself is the same in both releases, with some additional library functions (e.g. Array.Parallel.map) available with .NET 4.0/Visual Studio 2010 Beta1 (see the detailed release notes).
As with our previous CTP release, one team focus of the last 6 months has been on refining the F# language and taking feedback from the wonderful and growing F# community. For example, we have now made the F# lightweight syntax option the default for the language (i.e. for .fs/.fsi/.fsx files). We have added support for custom numeric type literals, which allows F# to interoperate nicely with the BigInteger type on .NET 4.0, and have improved aspects of .NET interoperability such as smoother calling of .NET param array methods. You can also use F#'s support for units-of-measure with integer types, e.g. to qualify integer types by annotations such as or <Clicks>. Additionally, we have been focusing on the performance of F# language constructs in this release. In particular, we have made performance improvements to F# sequence expressions, using a state machine compilation for sequence expressions that provides substantial performance improvements for code that generates data using these constructs. Similarly, if you disassemble some F# code you will notice that F# classes have compact representations, and that some other constructs such as F# members taking arguments in curried form are compiled more efficiently. Taken together our aim has been to ensure a predictability in the performance characteristics of related language constructs. More detail in the detailed release notes.
One area we have done considerable work is the F# library, and existing users will notice this when they move their code to this release. The consistent feedback we've had is that the F# library support must be consistent , powerful and simple to use. As a result, we have completed an end-to-end review of the library and made some revisions to ensure standard naming conventions and standard, simpler operator names . The library also now uses uppercase type variable names. More details are available in the detailed release notes, including details of two small breaking changes and some simple ways to cope with these. The Visual Studio 2008 release also provides versions of FSharp.Core.dll to use when developing F# applications for Silverlight 2.0 and the .NET Compact Framework 2.0/3.5.
This release also sees major improvements in F# debugging. First, in Visual Studio 2010 F# benefits from amazing new technology such as
(ok, it’s officially called historical debugging, but I grew up in the eighties). This a product-quality realization of a long term dream of many language implementations. Next, in both Visual Studio 2008 and Visual Studio 2010 you will see major improvements in data visualization for F# language constructs such as records and discriminated unions and F# library types such as lists, maps and sets. Breakpoint and stepping have also greatly improved, and in Visual Studio 2010 breakpoints can be more accurately positioned inside lambda functions. Some library support also aids in adhoc debugging, e.g. the printf format "%+A" can now be used to print the private, internals of and F# structured object (when running code as full-trust), and a width parameter can be specified to fit the formatted text within a visual display, e.g. "%+128A".
We have not neglected the F# Language Service and F# Project System. For example, when you build from Visual Studio you will notice that the error list is now populated with errors from the build process. We have also made many performance and reactivity improvements to the F# language service, eliminating points where the Visual Studio user interface became less reactive due to background computations and increasing the number of cases where intellisense is made available. There are also nice additional touches for scripting with F#, such as hovering over a #r declaration now reveals the exact resolution of an assembly reference.
Next, we now have preliminary documentation for the F# language on the MSDN website (yippee!). These are preliminary, and yes there are glitches, so please have patience and send us your feedback J There is also a minor known bug in the walkthroughs where the code snippets all have extra leading whitespace. Since F# is whitespace-significant by default, be sure to delete this leading whitespace when copying snippets. These new docs are another good F# reference, as well as a resource for getting started with the language.
Finally, we have done considerable work towards aligning F# with .NET 4.0 additions , with the aim of ensuring a long, bright, compatible future for functional, reactive and parallel programming on the .NET platform. For example, you will see that when using .NET 4.0, F# record, tuple and union types now implement the .NET 4.0 standard types IStructuralEquatable and IStructuralComparable. Furthermore F# tuples are compiled using the standard .NET 4.0 type System.Tuple. We've also added some lovely operators to the F# library for .NET 4.0, in the Microsoft.FSharp.Collections.Array.Parallel module, building on the .NET Parallel Extensions library. For example Array.Parallel.map can be used to perform a parallel map of a function over a large data array. Finally, you'll notice the addition of Async.CreateAsTask and the extension property .AwaitTask as ways to create and wait for .NET 4.0 tasks, meaning you can program .NET tasks directly using the F# asynchronous programming support!
Details of all this and more is in the detailed release notes, and look for more blogging by the F# team and community about all this and more. As always we are very glad to hear your feedback on all aspects of F#, and the above updates especially. We trust you enjoy your F# programming!
Don Syme, for the F# team