Relaxed assignment conversions for sealed types
Brian Goetz
brian.goetz at oracle.com
Thu Nov 19 20:47:59 UTC 2020
Bump -- hoping for feedback on this thought:
> BarImpl bi = (__static BarImpl) b;
>
> Pulling on this string some more — I think there’s a connection
> between this feature and total statement switches. We’ve been looking
> for a way to make statement switches total, and here, what we’re
> looking for is a way to make _casts_ total. Which suggests this is
> one feature, not two. So perhaps:
>
> switch-total (x) { … } // a switch, but with added bonus totality
> checking
>
> BarImpl b = (total BarImpl) bar // a cast, but with added bonus
> totality checking
>
> Obviously we can use another word besides `total`, but it’s a pretty
> good straw man.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20201119/d9f2d09f/attachment.htm>
More information about the amber-spec-experts
mailing list