Discussion Thread: DIP 1037--Add Unary Operator ...--Community Review Round 1

claptrap clap at trap.com
Sun Nov 1 19:24:07 UTC 2020


On Sunday, 1 November 2020 at 16:37:19 UTC, Andrei Alexandrescu 
wrote:
> On 11/1/20 5:15 AM, claptrap wrote:
>> On Saturday, 31 October 2020 at 23:09:31 UTC, Manu wrote:
>>> On Sat, Oct 31, 2020 at 12:05 PM Paul Backus via 
>>> Digitalmars-d < digitalmars-d at puremagic.com> wrote:
>>> Is "Alias Sequence" present in spec language?
>>> This really demonstrates how much D needs first-class tuples; 
>>> this area of
>>> the language is a shit-fight, and essentially just a weird 
>>> abuse of
>>> template argument lists mixed with `alias` and some 
>>> implementation defined
>>> behaviour, which happens to look and feel a lot like a tuple.
>> 
>> tuples already exists in other languages, in math / set 
>> theory, it's already a fairly well established idea and it 
>> seems a bit weird for D to invent its own name for what's 
>> essentially the same thing.
>
> It isn't the same thing.

Why isn't it the same thing? An AliasSeq and a tuple are both an 
ordered list of elements. That one holds values and the other 
holds aliases is down to the context in which either is used i 
think. So if you say we need to differentiate them, maybe thats a 
point, but then maybe it shouldn't need to be like that. Maybe 
they should be the same thing.




More information about the Digitalmars-d mailing list