> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Dimanche 9 Décembre 2018 19:04:40
> Objet: Re: Sealed types
>> We can introduce them as sealed interface (note: interface not type)
> This is a new claim. Why is it that abstract classes can’t be sealed as well?
> (Ther
>
> We can introduce them as sealed interface (note: interface not type)
This is a new claim. Why is it that abstract classes can’t be sealed as well?
(There is less _need_ for this, as abstract classes can use access control on
their constructors to simulate sealing, but that’s a weak approx
> De: "Brian Goetz"
> À: "Remi Forax"
> Cc: "amber-spec-experts"
> Envoyé: Dimanche 9 Décembre 2018 16:13:12
> Objet: Re: Sealed types
> I thought about Remi’s argument a little more:
>>> basically forcing me to write the code that the compiler generates for me
>>> when i
>>> use an anonymous
I thought about Remi’s argument a little more:
>
>> basically forcing me to write the code that the compiler generates for me
>> when i use an anonymous class.
>
And, it illustrates the danger of permitting syntactic shorthands out of
convenience — the user will not only not understand that
On 12/9/18 8:28 AM, Remi Forax wrote:
> Hi Doug,
> using colon ':' will cause trouble to people that discover Java after having
> used C or C# given that ':' is used to introduce supertypes in those
> languages.
I just noted that ":" is available. So are others with "" prefix: ":>",
"::", etc th
Hi Doug,
using colon ':' will cause trouble to people that discover Java after having
used C or C# given that ':' is used to introduce supertypes in those languages.
Your proposed compact declaration is a mess visually if you declare a subtype
which is a sealed interface with a list of subtypes,
On 12/7/18 1:43 PM, Brian Goetz wrote:
>> Maybe "permits" -> "exclusivelyIncludes" or just "exclusively"? These
>> seem less likely to be misinterpreted and also less likely to lead to
>> any confusion with not-rare use of "permits" as a variable (in
>> semaphores etc).
>
> Good thought.
The main