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

deadalnix deadalnix at gmail.com
Sun Sep 23 16:08:29 PDT 2012


Le 24/09/2012 00:48, Andrei Alexandrescu a écrit :
> This notion a lot of trouble with it; I think it's safe to abandon it
> entirely.
>
> 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.
>

This is a very weak point. In most cases, divide an conquer with tuple 
don't even make sense.

> Also, having no integrated notion of a zero-element tuple would again
> mess with the algebra as much as the absence of 0 would hurt numbers.
> It's just troublesome.
>
> I appreciate the attraction of this idea, but again I think it's safe to
> just not even discuss it.
>

I'm not sure I want to answer that, so I wont.


More information about the Digitalmars-d mailing list