Skip to content

Rename *Tuple symbols#3264

Merged
MartinNowak merged 1 commit intodlang:masterfrom
WalterBright:renameTypeTuple
May 7, 2015
Merged

Rename *Tuple symbols#3264
MartinNowak merged 1 commit intodlang:masterfrom
WalterBright:renameTypeTuple

Conversation

@WalterBright
Copy link
Member

Does the following renames in std.traits:

isExpressionTuple => isExpressions
ParameterTypeTuple => Parameters
FieldTypeTuple => Fields
ParameterDefaultValueTuple => ParameterDefaults

and in std.typetuple:

TypeTuple => Arguments

The original names are kept and documented as aliases kept for legacy compatibility. I didn't do a global search/replace in Phobos to change the names, preferring to keep this PR simple. Over time, as various modules get worked on, the names can be changed.

@WalterBright WalterBright mentioned this pull request May 7, 2015
5 tasks
@MartinNowak
Copy link
Member

Gets rid of TypeTuple except for in the module name.

@MartinNowak
Copy link
Member

Auto-merge toggled on

MartinNowak added a commit that referenced this pull request May 7, 2015
@MartinNowak MartinNowak merged commit cb680ec into dlang:master May 7, 2015
@andralex
Copy link
Member

andralex commented May 7, 2015

Next step is to add a new module name and have the old one just use it?

@MartinNowak
Copy link
Member

Next step is to add a new module name and have the old one just use it?

#3265

@WalterBright WalterBright deleted the renameTypeTuple branch May 10, 2015 00:06
@dnadlinger
Copy link
Contributor

wat.

@MartinNowak
Copy link
Member

This gets rid of TypeTuple which was deemed confusing because it's not really a tuple and can contain more than types.

@s-ludwig
Copy link
Member

Ehem, this doesn't get rid of TypeTuple, but gets rid of "TypeTuple" as part of template names where it made perfect sense. std.traits.Fields has a totally misleading name now, while FieldTypeTuple was perfectly fine. Name it FieldTypes if you want, but just Fields? There are also still other names, such as FieldNameTuple. Why hasn't that been renamed to Fields? Or FieldNames?

Also, this change isn't really documented well in the change log. It just says "changed FieldTypeTuple".

I think this should either be reverted, or all *Tuple symbols should just drop the Tuple part, but not the Type/Name part. Like it is now, it just adds inconsistency and confusion (I first tried to do typeof(Fields!T) and had to double-check that it already returns types).

ntrel added a commit to ntrel/phobos that referenced this pull request Feb 26, 2018
ntrel added a commit to ntrel/phobos that referenced this pull request Feb 27, 2018
Add legacy aliases.

* ParameterIdentifierTuple -> *ParameterNames* (consistency with FieldNames)
* ParameterStorageClassTuple -> ParameterStorageClasses
* BaseClassesTuple -> BaseClasses
* BaseTypeTuple -> BaseTypes
* InterfacesTuple -> *BaseInterfaces*
* FieldNameTuple -> FieldNames
* MemberFunctionsTuple -> *MemberOverloads* (more precise)
* RepresentationTypeTuple -> RepresentationTypes
* TransitiveBaseTypeTuple -> TransitiveBaseTypes
* isTypeTuple -> isTypes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants