On 11/1/10 10:22 AM, Masahiro Nakagawa wrote:
On Mon, 01 Nov 2010 13:21:23 +0900, Andrei Alexandrescu
<[email protected]> wrote:
Alright, then how do we solve refcounting of constant objects (see
Michel Fortin's question)? My solution involves casting away const and
keeping immutability information at runtime. Is that acceptable?
Your approach seems to be C++'s mutable. I am acceptable.
You said "There are several solutions possible" on digitalmars.D.
Can you show the example of other solutions?
One other solution is to simply say
@refcounted struct Widget { ... }
and let the compiler take care of everything.
"the compiler knowing about the idiom" means Python-like approach?
If so, I think such approach makes the compiler more complex :(
I agree.
Andrei
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos