Skip to content

Consider renaming Drop::finalize to Drop::drop #4332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erickt opened this issue Jan 2, 2013 · 11 comments
Closed

Consider renaming Drop::finalize to Drop::drop #4332

erickt opened this issue Jan 2, 2013 · 11 comments
Labels
A-destructors Area: Destructors (`Drop`, …) A-trait-system Area: Trait system

Comments

@erickt
Copy link
Contributor

erickt commented Jan 2, 2013

This is to address a XXX in src/libcore/ops.rs. I'll convert it into a proper fixme.

@catamorphism
Copy link
Contributor

Seems like more of an RFC?

@pcwalton
Copy link
Contributor

pcwalton commented Jan 3, 2013

+1. It's just a keyword issue. (Although we might want to keep the drop keyword around to indicate where the flag is)

@brson
Copy link
Contributor

brson commented Apr 27, 2013

I-nominated (backwards compatible)

@graydon
Copy link
Contributor

graydon commented May 2, 2013

Accepted for backward compat

@erickt
Copy link
Contributor Author

erickt commented May 2, 2013

Now that I've removed the old drop support, there should not be anything else holding up this change.

@ghost ghost assigned bstrie May 15, 2013
@bstrie
Copy link
Contributor

bstrie commented May 17, 2013

I tried to do this today, but the compiler is still complaining about finding drop in ident position. I'm guessing this means that we need to wait for another snapshot.

@glaebhoerl
Copy link
Contributor

With deepest apologies for bikeshedding: how come not Destruct and destruct()? It's usually referred to as a destructor, even by the Rustic. Why call it anything different?

@bblum
Copy link
Contributor

bblum commented Jun 11, 2013

+1 for drop

@luqmana
Copy link
Member

luqmana commented Jun 18, 2013

So will drop be kept as a keyword but allowed in the ident position or will it just be removed altogether as a keyword?

@bstrie
Copy link
Contributor

bstrie commented Jun 18, 2013

@luqmana I can't think of any reason not to remove it as a keyword altogether. I suppose someone might write a trait with a .drop method and then later get flustered if they try to add a destructor to it, but we have no precedence for reserving the method names of other magical opt-in traits, such as .add.

@graydon
Copy link
Contributor

graydon commented Jun 18, 2013

Non keyword, use "drop". Destruct sounds awkward and will make everyone ask why it's not called destroy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-destructors Area: Destructors (`Drop`, …) A-trait-system Area: Trait system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants