F# 8 Makes Code More Uniform And Performant
Thursday, 23 November 2023

Microsoft has released the latest version of F#, with changes the team says makes F# programs simpler, more uniform and more performant. The new version also has faster project compilation and upgrades to the FSharp.Core standard library.

F# 8 is part of the .NET 8 release, and is also included with new updates of Visual Studio 2022 and .NET 8 SDK.

F# is developed by a combination of Microsoft, which remains the main driver behind the language, and open-source community developers. It provides support for functional programming, and runs on Linux, Mac OS X, Android, iOS, Windows, GPUs, and browsers. Microsoft includes Visual F# in Visual Studio, and the language is also open source under an OSS-approved license and is available across multiple platforms through the F# Software Foundation.


Among the language improvements, the developers highlighted a new shorthand for defining simple lambda functions. They say this will be useful for situations when you only need an atomic expression (with no whitespace) on the lambda argument. The addition works for single property access, nested property access, method calls and indexers.

F#8 also has a new copy-and-update enhancement for nested records that avoids the need to write multiple nested with keywords, instead allowing you to use the dot-notation to reach to lower levels of nested records and update those. The new syntax allows copy-and-updating multiple fields using the same expression, and each copy-and-update within the same expression can be on a different level of nesting. The same syntax extension can be used on anonymous records, or when updating regular records into anonymous ones.

This release also adds a while! (while bang) feature that simplifies the usage of computation expressions when looping over a boolean condition that has to be evaluated by the computation expression first, such as inside an async{} block.

Other language improvements include an interpolated raw string literals inspired by the similar feature in C#. This improves the support for existing interpolated strings in F# by allowing the combination of literal text output with values and expressions by wrapping them into a pair of braces {}.

F#8 is available now as part of .NET 8.


More Information

F# On GitHub

F# Software Foundation

F# On .NET

Related Articles

C# 9 and F# 5 Released With .NET 5

F# Adds Anonymous Record

F# 4.5 Adds Span Support

F# 4.0 Signals A Culture Change

F# 4.0 Preview

Update for Try F#

F# 3.0 - Worth A Try

F# is Open Source - sort of

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Gain A Python Professional Certificate From edX

From now until the end of February edX is offering a saving of up to 30% on some of its expert-led courses and program bundles, which is a good incentive for going from thinking about enrolling to act [ ... ]

IEEE Medal of Honor Awarded to Bob Kahn

The IEEE Medal of Honor is awarded annually to a single recipient for exceptional contributions in the IEEE fields of interest. Robert E Kahn is the 2024 laureate for pioneering technical an [ ... ]

More News

raspberry pi books



or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 23 November 2023 )