Paul Krill
Editor at Large

F# 4.7 brings compiler and syntax improvements

news
Sep 24, 20192 mins

Next up for Microsoft’s functional-first language will be improvements for data analysis and machine learning uses

binary code streaming from a monitor display
Credit: Thinkstock

F# 4.7, the latest version of Microsoft’s functional-first open source programming language, introduces compiler infrastructure changes and relaxes syntax requirements. The F# 4.7 release arrived with .Net Core 3.0. A future version, F# 5, will focus on the use of the language for machine learning and other data analytics workloads. 

An incremental release, F# 4.7 targets version 2.0 of the .Net Standard specification of .Net APIs. The F# 4.7 release introduces a capability to tune the effective language version with the compiler. This enables delivery of new features alongside released features for any compiler release. Other capabilities in F# 4.7 include:

  • Syntax relaxations include no longer having to double underscore to specify member declarations without having to name the this object on F# identifiers; only a single underscore is needed. Also, there are indentation relaxations for parameters passed to static methods and constructors. Previously, F# compilers had a requirement to indent parameters to constructors or static methods.
  • Implicit yields for arrays, lists, sequences, and any computation expression that defines the Yield, Combine, Delay, and Zero members. F# 4.7 resolves an issue regarding the need to specify the yield keyword in sequence expressions. Now, yield keywords can be deleted, since they are implicit.
  • F# Interactive programming can be used from .Net Core, a capability that is in a preview stage.
  • A preview of the nameof function, a convenience to help with logging the names of parameters or classes, among others, and having the name change as would be expected if those symbols were refactored to use different names over time.
  • A preview of open static classes, allowing for better use of C# APIs that assume the ability to open static classes. F# DSLs also can be improved.

Plans for a F# 5 release, meanwhile, will focus on the use of the language for analytical workloads including machine learning and data science. One emphasis will be language features for working with large collections of data. F# also will be made a first-class language for Jupyter Notebook through the .Net Kernel.

Where to download F#

You can access F# 4.7 via .Net Core 3.0. Visual Studio users get .Net Core by default.

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