Does D really need something like const&?
Steven Schveighoffer
schveiguy at yahoo.com
Fri Mar 1 15:10:16 PST 2013
On Fri, 01 Mar 2013 18:05:12 -0500, Namespace <rswhite4 at googlemail.com>
wrote:
> I know about 'auto ref'. Nice try but ... ;)
Nice try? I don't get this. It was supposed to be the analogue to C++
rvalue references, Walter did not implement it as Andrei expected (AIUI).
He made it a (admittedly useful) template feature.
>> Need fine control over lifetime?
> scope and scoped give you the possibility to put a class instance on the
> stack so you have also controll over the instance lifetime.
> -> No reason for struct.
scoped is implemented via a struct...
> Interfaces, well, but I'm sure you can live without them sometimes.
OK, so by eliminating my use cases that are problematic for your theory,
yes, I guess I can base all my decisions on size ;)
-Steve
More information about the Digitalmars-d
mailing list