----- Mail original ----- > De: "John Rose" <[email protected]> > À: "Remi Forax" <[email protected]> > Cc: "Maurizio Cimadamore" <[email protected]>, "daniel smith" > <[email protected]>, > "amber-spec-experts" <[email protected]> > Envoyé: Mercredi 23 Juin 2021 04:35:06 > Objet: Re: Experience with sealed classes & the "same package" rule
> On Jun 22, 2021, at 2:08 AM, Remi Forax <[email protected]> wrote: >> >> 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. > > Nah. The JVM (and probably javac) has to check > for broken inputs always, regardless of how > likely those broken inputs might be. The OpenJDK is rich in term of engineering hours, i was thinking more about the other tools that consume the source file and the class file that are not in such position of privilege. Rémi
