March 02, 2013 Re: Does D really need something like const&? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Era Scarecrow | 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. ;)
|
Copyright © 1999-2021 by the D Language Foundation