-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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.
- ID: 105f9300-8b09-128a-12dd-ef80add1ef27
- Version Independent ID: ba56baa3-7913-42ed-a88f-f278e89acb4d
- Content: Type Abbreviations - F#
- Content Source: docs/fsharp/language-reference/type-abbreviations.md
- Product: dotnet-fsharp
- GitHub Login: @cartermp
- Microsoft Alias: phcart
Metadata
Metadata
Assignees
Labels
Type
Projects
Status