What's New in F# 10
10 days ago
- #DotNet
- #F#
- #Programming
- F# 10 introduces improvements to the language, FSharp.Core library, and tooling, focusing on clarity, consistency, and performance.
- New scoped warning suppression with #warnon and #nowarn directives allows precise control over warnings in specific code sections.
- Access modifiers can now be applied to individual auto property accessors, simplifying the creation of publicly readable but privately mutable state.
- ValueOption optional parameters enable struct-based optional parameters to avoid heap allocations in performance-critical code.
- Tail-call optimizations in computation expressions allow builders to opt into optimizations for return!, yield!, and do! in tail positions.
- Typed bindings in computation expressions no longer require parentheses for type annotations, improving syntax consistency.
- The discard pattern (_) is now allowed in use! bindings within computation expressions, aligning with regular use bindings.
- Pseudo-nested modules in types are now rejected, enforcing clearer module placement within type definitions.
- A deprecation warning is introduced for omitted seq in sequence expressions, encouraging the explicit seq { ... } form.
- Attribute target enforcement ensures attributes are only applied to their intended targets, preventing subtle bugs.
- Support for and! in task expressions allows concurrent awaiting of multiple tasks, improving idiomatic asynchronous workflows.
- Better trimming by default removes the need for manual ILLink.Substitutions.xml files, reducing application size automatically.
- Parallel compilation is introduced in preview, enabling faster compilation times for projects with multiple files and dependencies.
- A type subsumption cache improves type inference and IDE performance by caching type relationship checks.