Skip to content
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

Rename the deriving syntax extension to derive #534

Merged
merged 1 commit into from
Dec 31, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions text/0000-deriving2derive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- Start Date: 2014-19-19
- RFC PR: (leave this empty)
- Rust Issue: (leave this empty)

# Summary

Rename the `#[deriving(Foo)]` syntax extension to `#[derive(Foo)]`.

# Motivation

Unlike our other verb-based attribute names, "deriving" stands alone as a present participle. By convention our attributes prefer "warn" rather than "warning", "inline" rather than "inlining", "test" rather than "testing", and so on. We also have a trend against present participles in general, such as with `Encoding` being changed to `Encode`.

It's also shorter to type, which is very important in a world without implicit Copy implementations.

Finally, if I may be subjective, `derive(Thing1, Thing2)` simply reads better than `deriving(Thing1, Thing2)`.

# Detailed design

Rename the `deriving` attribute to `derive`. This should be a very simple find-and-replace.

# Drawbacks

Participles the world over will lament the loss of their only foothold in this promising young language.