<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>We have avoided in the past to mix the class restriction and the type system.<br></div><div>By example, even if a class A is declared final, List<? extends A> is not equivalent to List<A>.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>For me, you want to steer the type system to work more like a close world type system,<br data-mce-bogus="1"></div><div>so it's not very consistent with the existing semantics and the fact that we have chosen to add the keyword 'sealed' instead of introducing a special construct to define a sum type.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>regards,<br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Brian Goetz" <brian.goetz@oracle.com><br><b>À: </b>"Tagir Valeev" <amaembo@gmail.com><br><b>Cc: </b>"amber-spec-experts" <amber-spec-experts@openjdk.java.net><br><b>Envoyé: </b>Jeudi 19 Novembre 2020 21:47:59<br><b>Objet: </b>Re: Relaxed assignment conversions for sealed types<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><font size="+1"><font face="monospace">Bump -- hoping for feedback
on this thought: </font></font><br>
<br>
<blockquote class="">
<div class=""><span style="caret-color: rgb(0, 0, 0); font-family:
Menlo-Regular; font-size: 11px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; text-decoration: none; float:
none; display: inline !important;" class=""> BarImpl bi =
(__static BarImpl) b;</span></div>
</blockquote>
<blockquote cite="mid:4F38821E-C785-450D-BC2C-811A997B172E@oracle.com"><br class="">
<div class="">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:</div>
<div class=""><br class="">
</div>
<div class=""> switch-total (x) { … } // a switch, but with
added bonus totality checking</div>
<div class=""><br class="">
</div>
<div class=""> BarImpl b = (total BarImpl) bar // a cast, but
with added bonus totality checking</div>
<div class=""><br class="">
</div>
<div class="">Obviously we can use another word besides `total`,
but it’s a pretty good straw man.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</blockquote>
<br><br></blockquote></div></div></body></html>