Paul Krill
Editor at Large

Microsoft’s F# 5 nears feature completion

news
Sep 1, 20202 mins

Upgrade to Microsoft’s functional .NET programming language adds string interpolation in latest preview

keys to access solutions closure complete
Credit: Thinkstock

Microsoft has nearly completed feature work for F# 5, a planned upgrade to the open source functional language for .NET. The latest preview adds string interpolation.

A highly requested feature, interpolated strings in F# are fairly similar to those in C# or JavaScript, letting developers write “holes” inside of string literals. F# interpolated strings also allow for typed interpolation, similar to the sprint function, to enforce that an expression inside of an interpolated context conforms to a particular type.

Microsoft revealed it had reached feature completion on August 27, with the exception of what the company described as one minor enhancement planned for the .NET 5 release candidate. F# 5 is slated to reach general availability alongside the .NET 5 software development platform in November. At this point, Microsoft will focus mostly on bug fixes and addressing feedback.

F# 5 can be accessed by installing the NET 5 preview SDK or through NET and Jupyter Notebooks. In other recent developments in F# 5:

  • Support is now complete for nameof, which resolves the symbol it is being used for and produces a name that represents what it is called in F# source. This can be useful in scenarios such as logging, with logging protected against changes in source code.
  • Open type declarations are featured in the preview, similar to open static classes in C# except with differences in syntax and slightly different behavior to conform to F# semantics. With open type declarations, developers can open any type to expose its static contents. They also can open F#-defined unions and records to expose contents. This can be useful if a union is defined in a module and developers want to access its cases but not open the entire module.
  • Computation expressions, allowing developers to improve the expressiveness of components, have been enhanced to allow for application forms.
  • With this preview, interfaces can be implemented at generic instantiations.
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