<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></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>From: </b>"Kevin Bourrillion" <kevinb@google.com><br><b>To: </b>"Brian Goetz" <brian.goetz@oracle.com><br><b>Cc: </b>"daniel smith" <daniel.smith@oracle.com>, "valhalla-spec-experts" <valhalla-spec-experts@openjdk.java.net><br><b>Sent: </b>Thursday, June 16, 2022 9:16:43 PM<br><b>Subject: </b>Re: User model stacking: current status<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;"><div dir="ltr"></div></blockquote><div><br data-mce-bogus="1"></div><div>Hi Kevin,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><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;"><div dir="ltr"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><font size="4"><font face="monospace"> And arrays are
much worse. </font></font></div></blockquote><br><div>Arrays in general, or just the one single construction path `new TheType![size]` (or `new TheType.val[size]`)? I would just say please give us new Arrays methods or syntax that create and fill at once, and we'll get busy clamping down on everything else.</div></div></div></blockquote><div><br></div><div>It does work even in simple cases, by example try to write ArrayList or ArrayDeque with that primitive (array + fill).<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>RĂ©mi</div><div><br data-mce-bogus="1"></div><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;"><div dir="ltr"><div class="gmail_quote"><div><br></div><br><br><br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div>On 6/15/2022 2:10 PM, Kevin Bourrillion
wrote:<br>
</div>
<blockquote>
<div dir="ltr">
<div dir="ltr">On Wed, Jun 15, 2022 at 10:51 AM Brian Goetz <<a href="mailto:brian.goetz@oracle.com" target="_blank">brian.goetz@oracle.com</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr"><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> - If we spelled .val as !, then switching from P[] to
P![] not only prohibits null elements, but changes the
layout and _introduces tearing_. Hiding tearability
behind "non-null" is likely to be a lifetime subscription
to Astonishment Digest, since 99.9999 out of 100 Java
developers will not be able to say "non-null, oh, that
also means I sacrifice atomicity." </div>
</blockquote>
<div><br>
</div>
<div>Well, that's what you opted into when you... wait a
minute...</div>
<div><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>The link you probably want to attack is this last one,
where you are likely to say "well, that's what you opted
into when you said `non-atomic`; you just happen to get
atomicity for free with references, but that's a bonus." <br>
</div>
</blockquote>
<div><br>
</div>
<div>Your Kevin's Brain Emulator has gotten pretty decent over
time... check whether the next things it said were these
(probably so):</div>
<div><br>
</div>
<div>A good clean Basic Conceptual Model For Novices is
allowed to have a bunch of asterisks, of the form "well, in
$circumstance, this will be revealed to be totally false",
and that's not always a strike against the model. How do we
discern the difference between a good asterisk and a bad
one? How common the circumstance; how recognizable as <i>being</i> a
special circumstance; how disproportionate a truth
discrepancy we're talking about; etc.</div>
<div><br>
</div>
<div>I know I've said this before. If I'm in a class being
taught how this stuff works, and the teacher says "Now
unsafe concurrent code can break this in horrible ways, and
in $otherClass you will learn what's really going on in the
presence of data races" ... I feel fully satisfied by that.
I know I won't get away with playing fast and loose with The
Concurrency Rules; I'm not advanced enough and might never
be. (Many people aren't but <i>don't </i>know it, and
therein lies the problem, but do we really have much power
to protect such people from themselves?)</div>
<div><br>
</div>
<div>I could be wrong, but I suspect this kind of viewpoint
might be more common and respected in the wider world than
it is among the rarefied kind of individuals who join expert
groups, no offense to anyone here meant. You're always going
to see all the details, and you're always going to <i>want</i> to
see all the details. The general public just hopes the
details stay out of their way. When they don't, they have a
bad day, but it doesn't mean they were better served by a
complex model that tried to account for everything.</div>
<div><br>
</div>
<div><br>
</div>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div style="line-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-family:sans-serif"><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Kevin
Bourrillion |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Java
Librarian |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> Google,
Inc. |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"><a href="mailto:kevinb@google.com" target="_blank">kevinb@google.com</a></span><br data-mce-bogus="1"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="line-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-family:sans-serif"><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Kevin Bourrillion |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Java Librarian |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> Google, Inc. |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"><a href="mailto:kevinb@google.com" target="_blank">kevinb@google.com</a></span><br data-mce-bogus="1"></div></div></div></div></div></div></div></div><br></blockquote></div></div></body></html>