On 2010-12-07 05:23:34 -0500, "Simen kjaeraas" <[email protected]> said:
Michel Fortin <[email protected]> wrote:
And that's what my patch does. It only gets confusing when you add modifiers:
alias const(Object)ref A;
alias const(Object ref) B;
alias const(Object) C;
A ref a;
B ref b;
C ref c;
With my patch, variables 'a', 'b', and 'c' are all of the same type:
"const(Object)ref", the later 'ref' changing the constness of the
reference specified in the 'B' alias.
const(Object ref) is implicitly castable to const(Object) ref, no?
Yes.
So to me, it seems all of these should be const(Object) ref.
Seeing Foo ref name, I read this as 'non-const reference to some
class'. IOW, if you want a rebindable reference to a class T, the type
of T should not affect what hoops you must jump through to get there.
Great. That's how it works. I'm glad to see it suits you.
--
Michel Fortin
[email protected]
http://michelf.com/