DIP19: Remove comma operator from D and provision better syntactic support for tuples

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sun Sep 23 22:01:29 PDT 2012


On Sun, 23 Sep 2012 18:48:22 -0400
Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> 
> Once a one-element tuple becomes equivalent to the actual item,
> there's an explosion of trouble and special cases in the language and
> in code that uses it. For example, divide and conquer code that
> manipulates tuples and takes t[0 .. $/2] and t[$/2+1 .. $] would
> suddenly get to cases in which the slices are no longer tuples, and
> so on. And that's only the beginning.
> 

I think one of us is missing something, and I'm not entirely sure
who.

As I explained (perhaps poorly), the zero- and one-element tuples *would
still be* tuples. They would just be implicitly convertible to
non-tuple form *if* needed, and vice versa. Do you see a reason why
that would *necessarily* not be the case?


> I think it's safe to just not even discuss it.

A nice way to put it :/  Part politician perhaps? ;)




More information about the Digitalmars-d mailing list