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
thisobject 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
Zeromembers. F# 4.7 resolves an issue regarding the need to specify the yield keyword in sequence expressions. Now,
yieldkeywords 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
nameoffunction, 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.