Visual Studio 2010 Beta1 with F# is now available, plus matching F# CTP Update for VS2008


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 <Pixels> 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 time-travel debugging (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!  


 Screen Shot VS2010 Beta1



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

FSharpDebugging.png

Comments (21)

  1. Cross posted from blogs.msdn.com The F# team are thrilled to announce that Visual Studio 2010…

  2. With the release of VS 2010 Beta 1 today, F# is officially a part of the in-box VS family in the sense

  3. honu says:

    Congratulations F# team and community.

    Art Scott

  4. Hi Don,

      Does F# now have visual studio solution templates for the different application types like web application, silverlight 2/3 etc. I know it has a console application template.

  5. Tim Ng says:

    F# beta 1 is now live! See Don and Brian’s blog post for lots more information. In particular, on the

  6. Thank you for submitting this cool story – Trackback from DotNetShoutout

  7. Ronald Zubar says:

    A small detail but : shouldn't forall have been renamed to forAll ?

    It seems inconsistent with other functions…

    Kind regards

  8. Wow !!!

    Don, Congratulations

  9. DotNetBurner – burning hot .net content

  10. Alex Pedenko says:

    this is awesome. nice job guys.

  11. Anders Cui says:

    看着新版本的F#发布,忍不住看了几眼,收集了最近的一些关于F#的文章。其中的一篇Brian的文章中,包含了目前大多数F#专家的博客/站点,不容错过。

  12. Felienne says:

    I noticed you combine in the screenshot C# and F# within one solution. How do you do this and is it possible to reference one from antoher?

    Thanks!

  13. ni says:

    The ctp update links are broken!

  14. Vasili Galchin says:

    Hello,

          I am pretty fluent in Haskell and I can read most of the F# Tutorial.fs that comes with VS2010 Beta 1. I have an instance of VS2010 running with F# Tutorial.fs selected. I build it and then in the "interactive" box at the bottom of VS2010 I tried evaluate expressions like "cardA" from

    type Card = { Name  : string;

                 Phone : string;

                 Ok    : bool }

    let cardA = { Name = "Alf" ; Phone = "(206) 555-8257" ; Ok = false }

    let cardB = { cardA with Phone = "(206) 555-4112"; Ok = true }

    let ShowCard c =

     c.Name + " Phone: " + c.Phone + (if not c.Ok then " (unchecked)" else "")

    The interactive box (interpreter) doesn't "see" any of these expressions. Why?

    Thanks, Vasili

  15. Vasili Galchin says:

    Hello,

       Regarding Tutorial1.fs, using the "interactive" box at the bottom, if I pass expressions from Tutorial.fs they don't now evaluate. Why ???

    Regards, Vasili

  16. Kerris says:

    Can we expect a release of Visual Studio Express F#? 😀

  17. My F# Notes says:

    Now that Visual Studio 2010 Beta 1 is out, it is finally a good time to take a look at one of the (in…

  18. f# lover says:

    but it’s true that f# will be open source? i mean, you said in october 2010, that a compiler and the msr power pack will be released open source, but till today there’s nothing official. when we will know more about that?

  19. lotech_coder says:

    Is (Microsoft.)FSharp.PowerPack.dll removed from F#VS2010 Beta1 distribution? I’m looking for it, also re-checked VS2010 setup options, but did not make any progress. I was simply trying to use String.split function (used in the examples from Expert F# book), but cannot find right assembly to include.

    (Hi there! Take a look at http://news.softpedia.com/news/F-PowerPack-for-NET-4-0-and-Visual-Studio-2010-113365.shtml. Don)

     

  20. F# looks very interesting says:

    Are you releasing a new Expert F# book with all new features? or is there an existing book for this new version? I’m new to F#, I’m very interested in leaning it but don’t want to miss the good new features. All the books I found are from older versions…

  21. Ian Jones says:

    I’m now using the VS 2010 CTP and the PowerPack doesn’t seem to be available anymore. Trying to convince my C#-loving colleagues to take a look at F# isn’t easy when the very first sample in our "Expert F#" book can’t be made to run!