[phobos] [D-Programming-Language/phobos] 601c75: Improve parsing error handling

Daniel Murphy yebblies at gmail.com
Sun Sep 4 23:44:47 PDT 2011


On Mon, Sep 5, 2011 at 4:34 PM, Walter Bright <walter at digitalmars.com> wrote:
>
>
> On 9/4/2011 10:54 PM, Jonathan M Davis wrote:
>>
>> It's a bug in dmd. string literals aren't lvalues
>
> Yes, they are, because one can take the address of them.
>
> What they are not are *modifiable* lvalues.

Is this really a useful distinction?  All you can do with const
lvalues is pass them by const ref, and string literals will need to be
special cased to be const only when required.  The same applies to
struct literals etc as well.  Why can't we just make all literals
rvalues and fix auto ref to fill in the holes?


More information about the phobos mailing list