Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

The term "type abbreviation" suggests the alternate name must be shorter, but the feature allows names of any length. All three examples in the doc actually show longer names, creating confusion.

Changes

  • Added NOTE clarifying that despite the name, type abbreviations can be shorter or longer than the original type
  • Documented common usage pattern: abbreviating long type names or type applications with generic arguments
  • Explained that longer, more descriptive names are valid for improving readability

The established "type abbreviation" terminology is preserved throughout F# ecosystem and tooling, so only a clarification note was added rather than renaming the feature.

Fixes #20495

Original prompt

This section details on the original issue you should resolve

<issue_title>Type abbreviations are not actually abbreviations</issue_title>
<issue_description>I just learned that this feature is called "type abbreviation". I always assumed it was called "type alias". I am sure the ship on this name has sailed, but since I couldn't find discussion about naming choice, I decided to create this issue anyway.

All the definitions given by Merriam-Webster for abbreviation include the concept of being shorter. However, this feature allows an alternative name that can be either shorter or longer. To add insult to injury, all three code blocks show the alternative name being longer than the original name.

type [accessibility-modifier] type-abbreviation = type-name // 9 characters to 17 characters
type SizeType = uint32                                      // 6 characters to  8 characters
type Transform<'a> = 'a -> 'a                               // 8 characters to 13 characters

Maybe what was meant by "abbreviation" is not "syntactically shorter" but "conceptually simpler". I think the two given examples could satisfy this criteria in the right context, but of course this name still doesn't capture what the feature actually allows.

Like all human languages, English is constantly changing as people use it in new ways. It used to be that "literally" only meant "exactly like", but now it means either "exactly like" or "nothing like", which are opposites. Maybe the use of the word "abbreviation" has already embarked on a similar journey in which it means either "shorter" or "longer" but neither Merriam-Webster nor I are aware of it.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Comments on the Issue (you are @copilot in this section)

@BillWagner @T-Gro Should this one be closed without action? Or just add a note in the doc that an "alias" need not be "shorter" in terms of character count? @T-Gro Never thought about it this way. But it is so spread across the ecosystem that I am afraid it is too late to change that.

Maybe a delicate wording commentary can be added somewhere in the docs saying that the most common usage is to abbreviate long names, or abbreviate type applications with specified generic arguments into a single understandable name. And saying it can also be longer, even though in practice isn't.

It is even present as such in the compiler services and some public APIs.</comment_new>
<comment_new>@BillWagner
The right fix is to add a note in this article reflecting this comment: #20495 (comment)</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Internal previews

📄 File 🔗 Preview link
docs/fsharp/language-reference/type-abbreviations.md Type abbreviations

Copilot AI changed the title [WIP] Fix naming confusion around type abbreviations Clarify that type abbreviations need not be shorter Nov 21, 2025
Copilot AI requested a review from BillWagner November 21, 2025 16:51
Copilot finished work on behalf of BillWagner November 21, 2025 16:51
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM.

It's ready for final review.

@BillWagner BillWagner marked this pull request as ready for review November 21, 2025 21:48
@BillWagner BillWagner requested review from a team as code owners November 21, 2025 21:48
Copilot finished reviewing on behalf of BillWagner November 21, 2025 21:50
Copy link
Contributor

Copilot AI left a 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 addresses issue #20495 by clarifying that F# type abbreviations can be shorter or longer than the original type name, despite the potentially misleading terminology. The change adds a NOTE block that explains common usage patterns and validates the use of longer, more descriptive names.

  • Adds a NOTE block clarifying that type abbreviations can be any length
  • Documents common usage patterns for the feature
  • Preserves established terminology while addressing confusion

@BillWagner BillWagner enabled auto-merge (squash) November 24, 2025 18:46
@BillWagner BillWagner merged commit 7bab0f6 into main Nov 24, 2025
11 checks passed
@BillWagner BillWagner deleted the copilot/fix-type-abbreviation-naming branch November 24, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type abbreviations are not actually abbreviations

3 participants