Sealed types

Till Brychcy register.amber at brychcy.de
Wed Dec 12 17:34:55 UTC 2018


Are new keywords really necessary for this?

Given that  |super| can be already be used as opposite of |extends| in wildcard bounds,  it looks natural to me to use it instead of |final| and  |permits|, so

final interface Node permits A, B, C { ... }

would become

interface Node super A,B,C {...}

As shortcut for nest mates,  I could imagine something with * like in imports, e.g.

interface Node super Node.* { ...}



More information about the amber-spec-observers mailing list