context-free grammar

Walter Bright newshound2 at digitalmars.com
Fri Mar 4 20:31:38 PST 2011


uri wrote:
> Explain why (a*b) is lvalue in bearophile's second example.

Because the expression evaluates to a temporary, which is an lvalue.


> This is one of the weird things in D. The language is too complex. It takes
> years to find out about the corner cases.

It's not a weird corner case at all. Temporaries can be used as lvalues (in C++ 
too).


More information about the Digitalmars-d mailing list