Skip to content

Rename super() to supertype()#14338

Merged
nalimilan merged 1 commit intomasterfrom
nl/supertype
Jan 1, 2016
Merged

Rename super() to supertype()#14338
nalimilan merged 1 commit intomasterfrom
nl/supertype

Conversation

@nalimilan
Copy link
Copy Markdown
Member

This name is more explicit and consistent with subtypes().
Also rename promote_to_super() for consistency, but without
deprecation as it isn't exported.

Fixes #14337.

@StefanKarpinski
Copy link
Copy Markdown
Member

I'm in favor of this rename, but I suspect we should wait until after potential shakeup due to adding protocols and/or traits.

@nalimilan
Copy link
Copy Markdown
Member Author

Why not, but this doesn't strike me as really affecting the same code, nor requiring the same kind of change.

@StefanKarpinski
Copy link
Copy Markdown
Member

Eh, that's fair. I guess I'm just wondering somewhere if the whole notion of super won't go away. But maybe we should just do this anyway. It's a much better name.

@nalimilan
Copy link
Copy Markdown
Member Author

I'm fine with waiting for a bit until we know whether abstract types might go away completely.

@jakebolewski
Copy link
Copy Markdown
Member

They are not anytime soon.

@JeffreySarnoff
Copy link
Copy Markdown
Contributor

supertype is an easy preference

and super(x) should be reflexively assignable

@mason-bially
Copy link
Copy Markdown
Contributor

Also, I think based on my understanding of the proposals, although I might be wrong, but supertype would still be a helpful utility function regardless of the changes (even the proposal technically removing abstract types would still have use for a function named supertype).

@JeffBezanson
Copy link
Copy Markdown
Member

+1
Sorry this took long enough that it needs a rebase. But, let's rebase and merge it.

This name is more explicit and consistent with subtypes().
Also rename promote_to_super() for consistency, but without
deprecation as it isn't exported.
@nalimilan
Copy link
Copy Markdown
Member Author

No problem. I've rebased it and will merge when the tests pass.

@tkelman
Copy link
Copy Markdown
Contributor

tkelman commented Jan 1, 2016

please don't restart failed travis jobs without making a note and saving the log.

@nalimilan
Copy link
Copy Markdown
Member Author

Sorry, I always forget that Travis doesn't keep the log available.

nalimilan added a commit that referenced this pull request Jan 1, 2016
@nalimilan nalimilan merged commit 1691efd into master Jan 1, 2016
@nalimilan nalimilan deleted the nl/supertype branch January 1, 2016 18:25
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.

7 participants