Array literals' default type

Bill Baxter wbaxter at gmail.com
Mon Oct 12 09:19:49 PDT 2009


On Mon, Oct 12, 2009 at 9:42 AM, Phil Deets <pjdeets2 at gmail.com> wrote:
> On Mon, 12 Oct 2009 09:47:34 -0500, Don <nospam at nospam.com> wrote:
>
>> (OTOH I wonder how much extant C++ code uses the comma operator. I bet
>> there's not much of it. (But more than code than uses octal!)).

There are quite a few uses out there if you count for-loop clauses and
stuff hidden in macros.

I think it probably isn't possible to have
  a, b  = foo();
be valid D syntax with the "Don't re-interpret valid C" constraint.
But perhaps a slight variation like this could work:
  (a, b)  = foo();

--bb



More information about the Digitalmars-d mailing list