let (x,y) = ...

thedeemon via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Nov 23 21:45:53 PST 2015


On Monday, 23 November 2015 at 22:32:57 UTC, visitor wrote:
> On Monday, 23 November 2015 at 20:10:49 UTC, visitor wrote:
>> Andrea Fontana(s allows
>> let (hello, world) = ["hi", "there", "!"];
>
> of course in your version let (hello, world)[] = ["hi", 
> "there", "!"] works
> but for consistency with range, i think Fontana's note is 
> relevant

Well, I believe it's a matter of taste. By allowing different 
number of elements there you allow more errors to sink in without 
gaining anything at all. You lose the choice between strict and 
loose operators, erase the difference. It's not the "consistency" 
I would like to have.


More information about the Digitalmars-d-announce mailing list