Microsoft has released F# 9, the next version of its general-purpose programming language
F# has released its latest major version, 9, as part of .NET 9, bringing a host of new features and improvements aimed at enhancing program safety, resilience, and performance. Key updates include a type-safe approach to handling reference types that may have null values and auto-generated properties for discriminated union cases, facilitating easier case checks.
The language now supports returning bool in partial active patterns, expanding beyond the previous Some () and None options. F# also aligns with certain .NET library patterns by resolving extension methods that share names with intrinsic type properties, improving type checking.
Empty computation expressions are now supported, and hash directives for the compiler can accept any type of argument, not just strings in quotes. The #help directive in F# Interactive has been enhanced to show documentation for objects or functions without requiring quotes.
Addressing a previous issue, warning numbers with an FS prefix are now accepted, eliminating confusion when disabling warnings. Additionally, a warning is now emitted if the [] attribute is misplaced, and the compiler enforces AttributeTargets on various declarations and structures.
The update also includes enhancements to the standard library (FSharp.Core), developer productivity features, and performance improvements, making F# 9 a significant step forward for developers using the language.


