> De: "John Rose" <john.r.r...@oracle.com>
> À: "Maurizio Cimadamore" <maurizio.cimadam...@oracle.com>
> Cc: "daniel smith" <daniel.sm...@oracle.com>, "amber-spec-experts"
> <amber-spec-experts@openjdk.java.net>
> Envoyé: Mardi 22 Juin 2021 02:31:13
> Objet: Re: Experience with sealed classes & the "same package" rule

> That argument does not make sealing
> less useful or more dangerous in a
> non-modular setting, in a manner
> unique to sealing. So, I still fail to see
> why the proposed simplification has
> any downside at all.

The proposed simplification allows different packages to share different part 
of the sealed hierarchy without a module. 
So those packages can be in different jars, compiled at different times. 
This will produce "impossible" sealed hierarchies where by example two types 
are both permitted subtypes of each other. 

We can save a lot of test and debugging time to a lot of people by avoiding 
split sealed hierarchy. 

> — John

Rémi 

Reply via email to