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.

fsharp

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.

fsharp

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.

Banner


Oxlint Rust Powered Linter Reaches 1.0
26/08/2025

The first stable version Oxlint, a Rust-powered linter developed as part of the Oxc toolchain, has been released. The new linter promises a 50 to 100 times performance improvement over ESLint along wi [ ... ]



Oracle Database Adds MCP Tooling Support
02/09/2025

Oracle adds MCP support to two of its flagship tools, SQLcl and
SQL Developer for VS Code, in an attempt to simplify user interaction with the database.


More News

pico book

 

Comments




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

Last Updated ( Thursday, 23 November 2023 )