Tuple DIP
Basile B.
b2.temp at gmx.com
Sat Jan 13 02:18:20 UTC 2018
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote:
> On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote:
>> 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:
>>> [snip]
>>
>> I'm glad you're working on this.
>>
>> Proposal 1 is a little terse in explaining what you mean by
>> unpacking AliasSeqs. You might explain it in a little more
>> detail.
>>
>> Also, Proposal 1 starts with this example
>> auto (a, b) = tuple(1, "2");
>> (int a, string b) = tuple(1, "2");
>> but it also looks natural to be able to write
>> (int, string) (a, b) = tuple(1, "2");
>
> Really ?
> After the type should be the declarator. In this example
> there's no declarator but if you add it then it becomes very
> strange:
>
> (int, string) ab (a, b) = tuple(1, "2");
Forgot to say that on the other hand
(int a, string b) ab = tuple(1, "2");
works better.
More information about the Digitalmars-d
mailing list