Should the comma operator be removed in D2?

Bill Baxter wbaxter at gmail.com
Tue Nov 17 14:03:29 PST 2009


On Tue, Nov 17, 2009 at 1:51 PM, KennyTM~ <kennytm at gmail.com> wrote:
> On Nov 18, 09 05:40, Ellery Newcomer wrote:
>>
>> Bill Baxter wrote:
>>>
>>> However, I think for the good of humanity we can accept that one
>>> little bizarre example of legal C syntax not doing the same thing in
>>> D.
>>
>> int[] i;
>>
>> auto a = (i)[0];
>>
>> what does this do?
>
> (i) should not construct a tuple. Probably (i,).

That's Python's solution and it seems to work out ok.

--bb



More information about the Digitalmars-d mailing list