Should the comma operator be removed in D2?
Bill Baxter
wbaxter at gmail.com
Tue Nov 17 15:13:36 PST 2009
On Tue, Nov 17, 2009 at 3:01 PM, Ellery Newcomer
<ellery-newcomer at utulsa.edu> wrote:
> Bill Baxter wrote:
>> 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
>
> How do we express tuple types? ...
> These won't work:
> ...
> (int,int) [] lst; //want
Why won't that work? You may be right, but that particular
declaration doesn't seem ambiguous to me.
--bb
More information about the Digitalmars-d
mailing list