Paul Krill
Editor at Large

Microsoft previews F# 5

news
Mar 23, 20202 mins

Upgrade to Microsoft’s “functional-first” language emphasizes Interactive and analytical programming

coding / programming / development / binary code
Credit: Metamorworks / Getty Images

Microsoft is previewing F# 5, an upgrade to the company’s open source, “functional-first” language that emphasizes interactive, analytical programming.

The preview is available via the .NET 5 Preview SDK or Jupyter Notebooks for .NET. Visual Studio users on Windows will need the .NET 5 preview SDK and Visual Studio Preview

Aligning with improved .NET support in Jupyter notebooks, a number of improvements in F# 5 including language changes were aimed at making the interactive programming experience better overall. More features in this vein are planned for a future preview.

New and improved F# features, with the intent of improving interactive programming, include:

  • Easier package references via the new #r "nuget:..." command.
  • Enhanced data slicing in three areas: built-in FSharp.Core data types, 3D and 4D arrays in FSharp.Core, and reverse indexes and slicing from the end.
  • Applicative computation expressions that allow for more efficient computations provided that every computation is independent and results are merely accumulated at the end. When computations are independent of each other, they also are trivially parallelizable. One restriction: Computations are disallowed if they depend on previously computed values.
  • A new nameof function for logging or validating parameters to functions. By using actual F# symbols instead of string literals, refactoring names over time becomes less difficult.
  • A static class can be opened as if it were a module or namespace. This applies to any static class in .NET or .NET packages, or a developer’s own F#-defined static class.

Other features planned for F# 5 include witness passing for trait constraints with respect to quotations. Suggestions for the language will be tracked in a language suggestions repository.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author