docs
docs copied to clipboard
Add comprehensive What's New documentation for F# 7
Summary
Replaces placeholder blog link with full documentation for F# 7 features following F# 9 template structure.
Fixes #50481
Changes
The F# 7 documentation now includes:
- Static abstract members in interfaces - Runtime feature enabling generic math via interface constraints with static methods, demonstrated with
IAddition<'T>andINumber<'T>examples. Links to corresponding C# documentation for cross-reference. - Simplified SRTP syntax - Major ergonomic improvement allowing
'Tinstead of^Tfor type parameters, natural member call syntax ('T.Zerovs explicit constraint invocation), and grouped constraint declarations - Required properties checking - C# 11 interop with compile-time enforcement of required member initialization
- Init scope enforcement - Breaking change tightening init-only property mutation to initialization context only
- Reference assemblies support - Compiler capability via
--refout/--refonlyflags or MSBuild properties - Platform and performance improvements - ARM64 support, trimmability flags, parallel type-checking (experimental), N-d arrays up to rank 32
Code examples demonstrate practical usage patterns rather than abstract syntax. Documentation follows established F# 9 style with inline examples, sentence case headings, and active voice.
Original prompt
This section details on the original issue you should resolve
<issue_title>Missing documentation for F# 7</issue_title> <issue_description> This is really not the page that has the issue, rather the parent section "What's new".
There is no documentation for what is new in F# 7, beyond this blog post, that only savy developers will manage to find out.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: e2dea170-a8f4-90f6-e578-e406fb43fef1
- Version Independent ID: 885f9f09-d2ff-112c-6dda-9a31bccc0e8a
- Content: What's new in F# 6 - F# Guide
- Content Source: docs/fsharp/whats-new/fsharp-6.md
- Product: dotnet-fsharp
- GitHub Login: @cartermp
- Microsoft Alias: dotnetcontent
Associated WorkItem - 498946</issue_description>
<agent_instructions>Find docs pages for WhatsNew F#7. There is an attached link to a blog post. Read it and follow your instructions for properly copying content with code samples from blogs to docs.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@BillWagner ping @KathleenDollard @dsymeWho would be best to adapt the blog post for docs?</comment_new> <comment_new>
The content for "What's new" in F# 7 and F# 8 are only pointers to the blog post that announced those features.@BillWagner Instead, both should follow the example of F# 9 and have that blog content replicated in docs, with the appropriate docs styles.</comment_new>
- Fixes dotnet/docs#33166
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews
| 📄 File | 🔗 Preview link |
|---|---|
| docs/fsharp/whats-new/fsharp-7.md | What's new in F# 7 |