<div dir="ltr">On 31 May 2013 00:59, Byron Heads <span dir="ltr"><<a href="mailto:byron.heads@gmail.com" target="_blank">byron.heads@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thursday, 30 May 2013 at 14:41:09 UTC, Byron Heads wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Thursday, 30 May 2013 at 14:27:13 UTC, Russel Winder wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I still like:<br>
<br>
        x := 1<br>
<br>
for a declaration and initialization with type inference.<br>
</blockquote>
<br>
<br>
Could be used for assigning from tuples.<br>
<br>
iVal, sVal := returnsIntAndString();<br>
<br>
would have to decide on how to handle this<br>
x := 1;<br>
x := y * 7;  // error or assignment?<br>
<br>
more of an issue with tuples then single lvalues<br>
</div></blockquote>
<br>
could also be used without the type inference<br>
<br>
int x;<br>
x, string s := returnIntAndString();<br>
------<br>
int wx, wy;<br>
...<br>
wx, wy := window.position;<br>
</blockquote></div><br></div><div class="gmail_extra" style>I've raised the topic of multiple-return-values a whole heap of times. It's usually shot down because it would create ambiguities in existing syntax.</div>
<div class="gmail_extra" style>MRV is super useful, and potentially more efficient too (in an ABI where MRV can each return in arg registers, can save lots of memory hazards). It produces a situation where you can return more than a single value from a leaf function (really handy!).</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>So, I'm very curious to explore how any new assignment syntax can interact/support with MRV...</div></div>