Microsoft is previewing F# 5, an upgrade to the company’s open source, “functional-first” language that emphasizes interactive, analytical programming.
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
- 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
nameoffunction 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.