Skip to content

Commit

Permalink
Consistent class and interface syntax (#2760)
Browse files Browse the repository at this point in the history
Update syntax of `class` and `interface` definitions to be more consistent. Constructs that add names to the class or interface from another definition are always prefixed by the `extend` keyword.

Implements the decisions in:

-   [#995: Generics external impl versus extends](#995),
-   [#1159: adaptor versus adapter may be harder to spell than we'd like](#1159),
-   [#2580: How should Carbon handle conditionally implemented internal interfaces](#2580), and
-   [#2770: Terminology for internal and external implementations](#2770).

Co-authored-by: Richard Smith <[email protected]>
  • Loading branch information
josh11b and zygoloid authored Jun 15, 2023
1 parent 474b1eb commit 6f8cf38
Show file tree
Hide file tree
Showing 2 changed files with 841 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/design/lexical_conventions/words.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ in Unicode Normalization Form C (NFC).
The following words are interpreted as keywords:

- `abstract`
- `adapt`
- `addr`
- `alias`
- `and`
Expand All @@ -51,8 +52,7 @@ The following words are interpreted as keywords:
- `continue`
- `default`
- `else`
- `extends`
- `external`
- `extend`
- `final`
- `fn`
- `for`
Expand All @@ -77,6 +77,7 @@ The following words are interpreted as keywords:
- `partial`
- `private`
- `protected`
- `require`
- `return`
- `returned`
- `Self`
Expand Down
Loading

0 comments on commit 6f8cf38

Please sign in to comment.