clarity needed for the non-sealed keyword
Florian Weimer
fw at deneb.enyo.de
Thu Oct 8 19:17:03 UTC 2020
* Remi Forax:
> a sealed type lists all it's subtypes (the permits clause) so the
> name of a subtype have to be stable, i.e. not change from one
> compilation to an other or from one compiler to an other. So you
> can not use a local class as a subtype of a sealed type because the
> name of a local class is not stable.
>
> So there is no ambiguity for the tokens "non-sealed" inside a
> method, it always means "non" "-" "sealed".
But why does the keyword contain a “-”? Why wasn't “nonsealed” good
enough? Is it really worth creating this special case for the lexer?
More information about the amber-dev
mailing list