Should the comma operator be removed in D2?

Leandro Lucarella llucax at gmail.com
Tue Nov 17 06:06:11 PST 2009


Ellery Newcomer, el 16 de noviembre a las 19:02 me escribiste:
> Justin Johansson wrote:
> 
> > Great. Sounds like problem solved in that there is no problem.
> > 
> > So how do people feel about bill's suggestion to progress the issue
> > further?
> > 
> > Be good to get some comments from higher-up (Walter, Andrei)?
> > 
> > Predict bearophile will chime in on this one too?
> 
> The real problem is you'd end up with a tuple syntax identical to a
> valid c syntax. If D silently accepts it, but does something different,
> it's a no go.

Code ported from C should not compile if the comma expression is converted
to a tuple literal because if a and b are int, typeof(a,b) is int now and
will be Tuple!(int, int) in the future, and I don't think
a Tuple!(anything) could be implicitly casted to anything, except, maybe,
another tuple, but you don't have tuples in C, so there is no risk on that.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
I always get the feeling that when lesbians look at me, they're thinking,
'*That's* why I'm not a heterosexual.'
	-- George Constanza



More information about the Digitalmars-d mailing list