<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4" face="monospace">Yes, considerable consideration has
      been given to this.  It turns out it is trickier than it looks,
      but we understand that it is desirable, and will try to make it
      happen if we can.  <br>
    </font><br>
    <div class="moz-cite-prefix">On 3/1/2024 4:14 AM, Stephen Colebourne
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CACzrW9CKb9Mj1R7O-t1HAZtLZjy6PR=Ff5N26c6-d+4YpUUioQ@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">I believe that many, if not most, uses of derived record creation
expressions will have a single assignment. Has consideration been
given to allowing a single assignment expression instead of a block?

eg this:
  record Complex(double re, double im) {
    Complex conjugate() { return this with { im = -im; }; }
    Complex realOnly()  { return this with { im = 0; }; }
    Complex imOnly()    { return this with { re = 0; }; }
  }

becomes:
  record Complex(double re, double im) {
    Complex conjugate() { return this with im = -im; }
    Complex realOnly()  { return this with im = 0; }
    Complex imOnly()    { return this with re = 0; }
  }

In general, I think this JEP is OK, but it doesn't move the needle
much without a mechanism to create the record in a similar way.

Stephen
</pre>
    </blockquote>
    <br>
  </body>
</html>