<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1320619801;
mso-list-template-ids:-1;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:"Courier New";
mso-bidi-font-family:"Times New Roman";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style>
</head>
<body lang="NL-BE" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">On 2023-01-24 00:42 UTC, Brian Goetz wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> Yes, substitute "normal completion" for "exit".<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I think I see what you mean. Still I think the original might be more descriptive?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> * Add the requirement that `super()` and `this()` may not appear
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> within any `try { }` block<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Additionally, I think it would need to be extended to prevent calling
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">`super()` or `this()` in lambdas? Or to mirror some other parts of the<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">spec, a constructor call can’t be enclosed by a try block?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">----<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">On 2023-01-24 20:11 UTC, Archie Cobbs wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> This made me realize there is another missing requirement:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> - Upon normal return from a constructor, the `this` reference must be DA<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> Wouldn't that requirement subsume the one about try blocks? What I mean is,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">the normal dataflow analysis already takes care of try blocks, and what we<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">care about is the DA/DU state when the constructor eventually returns.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> -Archie<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I think that only prevents "try catch" and not "try finally"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">(or "try with resources"). <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Actually that made me realize that in "try catch finally" or
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">"try catch with resources", `this` or `super` calls shouldn't<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">appear in any of the catch blocks either.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">----<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">On 2023-01-24 20:21 UTC, Brian Goetz wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> You can simplify the rule about try blocks to:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> - if `this` is DU on entry to a try block, it must be DU on normal
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">completion of the try block.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">> Can you simplify further, while still preventing `this` calls inside a
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">try block? I don't think so, since we might want to allow a try block
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">before the super/this call.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">What about <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> - At each point in the program, if `this` is not DA, it must be DU<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I think that covers all try cases?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kind regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Robbe Pincket<o:p></o:p></span></p>
</div>
</body>
</html>