The newest version of Microsoft’s multi-paradigm language features a much-sought ability to suppress warnings in specified code sections.
With the scoped warning suppression capability, the compiler now supports the #warnon directive, which is paired with #nowarn to disable or enable warnings within a specific code span. The F# 10 update was introduced along with .NET 10 on November 11. Developers can get F# 10 by downloading .NET 10 or by accessing Visual Studio 2026 Insiders. A November 17 blog post introducing F# 10 notes that some changes to improve the consistency of #nowarn/#warnon directives were breaking changes, which could affect a codebase when updating to the new version.
F# 10 also allows developers to apply distinct access modifiers to individual property accessors. This capability allows developers to specify access levels for the getter and setter of a property inline, enabling common patterns such as publicly readable but privately mutable state without verbose boilerplate. Another new capability in F# 10 enables optional parameters to use a struct-based ValueOption<'T> representation. By applying the [<Struct>] attribute to an optional parameter, developers can instruct the compiler to use ValueOption<'T> instead of the reference-based option type. This avoids a heap allocation for the option wrapper, which is beneficial in performance-critical code. Other improvements available in F# 10 include the following:
