assignment: left-to-right or right-to-left evaluation?

Nick Sabalausky a at a.a
Mon May 11 13:06:27 PDT 2009


"Nick Sabalausky" <a at a.a> wrote in message 
news:gua0dm$121j$1 at digitalmars.com...
>
> I was giving a little bit of thought to assignment chaining the other day. 
> Unless someone can point out why I'm wrong, I think some of the 
> functional-style stuff we've been getting into can make assignment 
> chaining obsolete.
>
> Hypothetical example:
> [mydic[x], mydic[y], mydic[z]].fill(mydic.length);

Or maybe something like:
[mydic[x], mydic[y], mydic[z]].each = mydic.length;

>
> I think something like that would be more clear than both the "tmp" and 
> assignment chaining versions, and perhaps allow any language complexities 
> that arise from the assignment chaining feature to be removed.





More information about the Digitalmars-d mailing list