Tuple DIP

Timothee Cour thelastmammoth at gmail.com
Mon Feb 19 23:53:38 UTC 2018


great! maybe worth adding to DIP? (even though `unpack` would be
(IIUC) a pure library solution on top of this DIP)

and that would work too I guess?
```
string[4] args=...;
auto (infile, colname, repl, outfile) = args.unpack;
```


On Mon, Feb 19, 2018 at 3:47 PM, Timon Gehr via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 20.02.2018 00:43, Timon Gehr wrote:
>>
>>
>> void main(){
>>      auto (infile, colname, repl, outfile) = args[1..$].unpack!4("Invalid
>> args\n");
>> }
>
>
> Actually:
>
> void main(string[] args){
>
>     auto (infile, colname, repl, outfile) = args[1..$].unpack!4("Invalid
> args\n");
> }
>


More information about the Digitalmars-d mailing list