Microsoft’s F# 6 boosts performance, ease

F# 6, an upgrade to Microsoft’s open source, multi-paradigm, programming language, is now officially available as part of .NET 6. The new version promises to make it easier to write succinct, performant code, Microsoft said.

.NET 6 was formally unveiled on November 8. F# 6 also was previewed with .NET 6  Release Candidate 2 and Visual Studio 2022 RC2. F# supports multiple programming models including functional, object-oriented, and imperative.

With F# 6, project developers aimed to make the language simpler and more performant in areas including language design, library, and tools. A goal of the long-term evolution of the language is to remove corner-cases that surprise users or are unnecessary hurdles to adoption.

Speed and interoperability in F# 6 are being addressed with a task {…} capability to create a task and await it. One of the most requested features for F#, and the most significant technical feature in F# 6, has been to make authoring asynchronous tasks simpler, more performant, and more interoperable with other .NET languages such as C#.

Prior to this release, creating .NET tasks required using async {…}  to create a task and then invoking Async.AwaitTask. Now task {…} can be used directly to build a task. Built-in support for task {…} is available in F# code with no need to open namespaces. Task support had been available for F# 5 through the TaskBuilder.fs and Ply libraries. These guided the design of task support in F# 6.

Elsewhere in F# 6:

Copyright © 2021 IDG Communications, Inc.

Source link