Tuple DIP

timotheecour timothee.cour2 at gmail.com
Mon Feb 19 23:19:41 UTC 2018


On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
> As promised [1], I have started setting up a DIP to improve 
> tuple ergonomics in D:
>
> https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
>
>
> This DIP aims to make code like the following valid D:
...

Would this DIP allow array unpacking?

eg, see this rust snippet from 
https://gist.github.com/anonymous/9cfc3d1b057f7a137ccbfb94bf4bfcef

```
fn main() {
   let (infile, colname, repl, outfile) = 
std::env::args().skip(1).tuples().next().expect("Invalid args\n");
}
```

what would be the D equivalent under this DIP? (just for the 
array unpacking part )





More information about the Digitalmars-d mailing list