Tuple DIP
Timon Gehr
timon.gehr at gmx.ch
Mon Jun 3 18:54:17 UTC 2019
On 03.06.19 18:33, ixid wrote:
> On Wednesday, 19 September 2018 at 21:48:40 UTC, Timon Gehr wrote:
>> So do I, but I need to get a quiet weekend or so to finish this.
>>
>>> I am very tempted to start my own dip on this and finish it.
>>
>> Here's the current state of my implementation in DMD:
>> https://github.com/dlang/dmd/compare/master...tgehr:tuple-syntax
>>
>> It has no tests yet, but basically, with those changes, you can write
>> tuple literals `(1, 2.0, "3")`, you can unpack tuples using `auto (a,
>> b) = t;` or `(int a, string b) = t;`, and tuples can be expanded using
>> alias this on function calls, so you can now write things like
>> `zip([1,2,3],[4,5,6]).map!((a,b)=>a+b)`.
>>
>> The implementation is still missing built-in syntax for tuple types,
>> tuple assignments, and tuple unpacking within function argument lists
>> and foreach loops.
>
> Hey Timon, any progress on this? I've been excitedly wanting this tuple
> syntax since your DIP.
I'm afraid no. I'll try to get back to this; I have been busy with work
and I have sunk some (ultimately unproductive) time into `__mutable` per
Andrei's request.
More information about the Digitalmars-d
mailing list