-
Notifications
You must be signed in to change notification settings - Fork 6.1k
What's new in F# 10 #49649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
What's new in F# 10 #49649
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for F# 10 features. The document introduces new language features, library improvements, and tooling enhancements available in F# 10 that ships with .NET 10 and Visual Studio 2022.
Key changes:
- New documentation file covering 11 major F# 10 features including scoped warning suppression, access modifiers on auto properties, ValueOption optional parameters, tail-call support in computation expressions, and parallel compilation.
- Detailed examples with code snippets demonstrating before/after patterns for each feature.
- Breaking changes and compatibility notes are clearly highlighted throughout.
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @abonie
This is a great draft. I had a couple comments to consider.
Co-authored-by: Adam Boniecki <20281641+abonie@users.noreply.github.com>
Thanks for the feedback! I have made some changes based on your comments @BillWagner |
| --- | ||
| title: What's new in F# 10 - F# Guide | ||
| description: Get an overview of the new features available in F# 10. | ||
| ms.date: 11/11/2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BillWagner @gewarren I have copy-pasted this metadata section from a previous article and I simply guessed that ms.date is preferred publication date, let me know if that's wrong
| If you need full manual control, you can still add your own substitutions file. | ||
| You can turn off the auto-generation with the `<DisableILLinkSubstitutions>false</DisableILLinkSubstitutions>` property. | ||
|
|
||
| ## Parallel compilation in preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is docs, I feel like this page should also have some info w.r.t to the type cache now part of the compiler.
Not so much hyping it, but rather the ways it can be controlled via switches/env vars so that people have a way to react if they are unhappy with the memory profile or eviction mechanics (after all people might be compiling on machines we did not have a chance to test it on).
@majocha , @abonie -
I imagine the following user guidance:
- To turn it off, fallback to
<LangVersion>9<..> - To turn off eviction via dedicated agents (= increases thread pressure) and replace it with sync eviction use the
FSharp_CacheEvictionImmediate=1env var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I decided to omit it from the docs since it is more of an implementation detail, doesn't even have its own dedicated setting(?) and keep it for the blog. But I see your point.
In that case, is there a specific situation/symptom that might point to issues with type cache? So I can say e.g. "If <specific condition> and you see longer compilation times after updating, then consider falling back to F# 9 via LangVersion". Also, if we're expecting that a significant portion of users might want to turn this off, should we have a dedicated setting for the type subsumption cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with:
- Increased memory footprint
- Increased CPU usage (due to type eviction spinning up additional workers to maintain the cache under churn)
Summary
Article about new changes in F# 10
Internal previews