Array literals' default type
    Jarrett Billingsley 
    jarrett.billingsley at gmail.com
       
    Mon Oct 12 10:04:03 PDT 2009
    
    
  
On Mon, Oct 12, 2009 at 10:47 AM, Don <nospam at nospam.com> wrote:
>> Wasn't the comma operator to be supposed to be important for automatic
>> code generation?
>
> It's used frequently in in the compiler internals. EG, given
>
> int foo(X x = default_value) { return 0; }
> then foo(); becomes:   (X tmp = default_value, foo(tmp));
There doesn't need to be any *syntactic* reservation for something
that's used internally by the compiler. I mean, we don't have to
explicitly mark which brace blocks introduce scopes, but
ScopeStatements are alive and well inside the compiler. CommaExp could
just become "SequenceExp" or something and it would have the exact
same effect. I really don't think there will be a lot of moaning if
comma expressions disappeared. And yes, for loop increments can be
special-cased, geez..
    
    
More information about the Digitalmars-d
mailing list