Const ref and rvalues again...
Jonathan M Davis
jmdavisProg at gmx.com
Thu Nov 8 14:44:12 PST 2012
On Thursday, November 08, 2012 21:49:58 Manu wrote:
> That's cute, but it really feels like a hack.
> All of a sudden the debugger doesn't work properly anymore, you need to
> step-in twice to enter the function, and it's particularly inefficient in
> debug builds (a point of great concern for my industry!).
>
> Please just with the compiler creating a temporary in the caller space.
> Restrict is to const ref, or better, in ref (scope seems particularly
> important here).
I honestly wish that in didn't exist in the language. The fact that it it's an
alias two different attributes is confusing, and people keep using it without
realizing what they're getting into. If scope worked correctly, you'd only
want it in specific circumstances, not in general. And since it doesn't work
correctly aside from delegates, once it _does_ work correctly, it'll break
code all over the place, because people keep using in, because they like how
it corresponds with out or whatever.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list