<div dir="ltr"><div>This is not too important right now, but I had thoughts, so...</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 1, 2023 at 10:59 AM Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>> wrote:<br></div><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><font size="4"><font face="monospace">Users should be able to say `new
        Complex()` and get a default complex value.  (Maybe they can
        also say `Complex.default`; maybe we won't need that.)  And the
        same for reflection.</font></font></div></blockquote><div><br></div><div>I think the argument for `MyVal.default` being *unnecessary* might go like this:</div><div><br></div><div>* either there's no implicit constructor and `MyVal.default` won't work<br>* or there is, and `MyVal.default` would have to mean the same as `new MyVal()`, so what's the point?<br><br>If that's correct, there might not be a strong argument for keeping it, but I came up with a couple weak ones.</div><div><br>1. Arguably, its meaning is more apparent without the reader having to dig into MyVal.java (how much does this matter, in this case?)</div><div>2. It *feels like* a well-known immutable value that just kind of "exists" and has no need to be constructed. A constant. In fact people might feel tempted to make such constants?</div><div><div><br></div></div><div>Note I do still approve of `public implicit MyVal();` and even of calling that a "constructor", because it nearly enough plays that role. But something about the term "implicit construction" doesn't seem right. "Default initialization" seems more on point I guess.)<br></div><div> </div><div>(Tangent: while the choice of keyword isn't that important right now, I have already found myself saying "explicit implicit constructor" and then frowning in momentary confusion :-))</div></div><span class="gmail_signature_prefix"><div><span class="gmail_signature_prefix"><br></span></div><div><span class="gmail_signature_prefix"><br></span></div>-- </span><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/Kotlin Ecosystem Team |</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></div></div></div></div></div></div></div></div>