-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |