groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susanne Jaeckel" <susann...@gmx.de>
Subject Aw: [VOTE] new operator ?=
Date Thu, 24 Nov 2016 09:49:22 GMT
<html><head></head><body><div style="font-family: Verdana;font-size:
12.0px;"><div>
<div>+1</div>

<div>&nbsp;</div>

<div>but... if it&#39;s allowed and not late, I would like to share my thoughts...:</div>

<div>&nbsp;</div>

<div>Generally, I like the idea of the elvis assignment! But - as someone earlier noted
- I would prefere the &quot;more verbose&quot; assignment - if possible - like</div>

<div>&nbsp;</div>

<div>it ?:= &#39;bar&#39;</div>

<div>&nbsp;</div>

<div>The reason for this is, I think if you would read this like the above one:</div>

<div>&nbsp;</div>

<div>if it is true ? assign nothing : else assign &#39;bar&#39;</div>

<div>&nbsp;</div>

<div>In the other case...</div>

<div>&nbsp;</div>

<div>it ?= &#39;bar&#39;</div>

<div>&nbsp;</div>

<div>... I&#39;m not quite sure...</div>

<div>&nbsp;</div>

<div>Just my 2&#39;ct</div>

<div>&nbsp;</div>

<div>Regards,</div>

<div>Susi.</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px
solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Mittwoch, 23.
November 2016 um 16:59 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Daniel Sun&quot; &lt;realbluesun@hotmail.com&gt;<br/>
<b>An:</b>&nbsp;users@groovy.incubator.apache.org<br/>
<b>Betreff:</b>&nbsp;[VOTE] new operator ?=</div>

<div name="quoted-content">Hi all,<br/>
<br/>
If the new operator ?= (e.g. a ?= &#39;foo&#39; is equivalent of a = a ?:<br/>
&#39;foo&#39;) were to be added to Groovy programming language, do you like it?<br/>
(Yes: +1; No: -1; Not bad: 0)<br/>
<br/>
Cheers,<br/>
Daniel.Sun<br/>
<br/>
<br/>
<br/>
--<br/>
View this message in context: <a href="http://groovy.329449.n5.nabble.com/VOTE-new-operator-tp5736931.html"
target="_blank">http://groovy.329449.n5.nabble.com/VOTE-new-operator-tp5736931.html</a><br/>
Sent from the Groovy Users mailing list archive at Nabble.com.</div>
</div>
</div>
</div></div></body></html>

Mime
View raw message