-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reserve
abstract
, final
, and override
as possible keywords.
- Loading branch information
Showing
1 changed file
with
35 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,35 @@ | ||
- Start Date: (fill me in with today's date, YYYY-MM-DD) | ||
- RFC PR: (leave this empty) | ||
- Rust Issue: (leave this empty) | ||
|
||
# Summary | ||
|
||
Reserve `abstract`, `final`, and `override` as possible keywords. | ||
|
||
# Motivation | ||
|
||
We intend to add some mechanism to Rust to support more efficient inheritance | ||
(see, e.g., RFC PRs #245 and #250, and this | ||
[thread](http://discuss.rust-lang.org/t/summary-of-efficient-inheritance-rfcs/494/43) | ||
on discuss). Although we have not decided how to do this, we do know that we | ||
will. Any implementation is likely to make use of keywords `virtual` (already | ||
used, to remain reserved), `abstract`, `final`, and `override`, so it makes | ||
sense to reserve these now to make the eventual implementation as backwards | ||
compatible as possible. | ||
|
||
# Detailed design | ||
|
||
Make `abstract`, `final`, and `override` reserved keywords. | ||
|
||
# Drawbacks | ||
|
||
Takes a few more words out of the possible vocabulary of Rust programmers. | ||
|
||
# Alternatives | ||
|
||
Don't do this and deal with it when we have an implementation. This would mean | ||
bumping the language version, probably. | ||
|
||
# Unresolved questions | ||
|
||
N/A |