Sealed types -- updated proposal

Brian Goetz brian.goetz at
Thu Jan 17 18:03:21 UTC 2019

> Contextual keywords are usually OK as modifiers (as long as they don’t want to show up somewhere else), so `sealed` is not terrible.
> ???, i'm confused,
> a contextual keyword means it's only a keyword in some context, so if it shows up somewhere else, it's not a keyword.

Consider “extends”. Yes, it shows up in the class declaration grammar, but it also wants to show up in type bounds: <T extends Bar>.  We have to think very carefully whether a contextual keyword we introduce today, when we might only be thinking of the declaration, will come back later in less constrained syntactic contexts.  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list