Does D really need something like const&?

Namespace rswhite4 at googlemail.com
Sat Mar 2 15:25:09 PST 2013


On Saturday, 2 March 2013 at 21:46:49 UTC, Era Scarecrow wrote:
> On Saturday, 2 March 2013 at 08:29:25 UTC, Namespace wrote:
>> Era Scarecrow:
>> Did I understand right that your answer is 'No, we don't need 
>> something like const&'?
>
> const& is ugly and suggests it is using a pointer which we 
> don't want to use except in low level stuff. const& doesn't 
> make sense, but 'auto ref' does, and I think it could be quite 
> useful.

Yes, something similar to "auto ref" was meant by "_something_ 
like const&", of course. ;)



More information about the Digitalmars-d mailing list