Skip to content

Type abbreviations are not actually abbreviations #20495

@TysonMN

Description

@TysonMN

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.


Associated WorkItem - 510309

Metadata

Metadata

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-fsharp/svchelp wantedGood for community contributors to help [up-for-grabs]in-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions