On Wednesday, 24 April 2013 at 08:27:15 UTC, Denis Shelomovskij
wrote:
19.04.2013 11:45, deadalnix пишет:
On Friday, 19 April 2013 at 07:31:16 UTC, Denis Shelomovskij
wrote:
Another try to describe the problem:
When I get a delegate, I'd like to use it unless it become
invalid.
How does using an object solve that ?
Unless this is a struct-member delegate (which is not often
used anyway and can be marked as dangerous e.g.):
---
T delegate(A) del = ...;
rt_attachDisposeEvent(_d_toObject(del.ptr),
&onDelegateDisposed);
---
I still see many possibilities without changing the language. For
instance, allowing to attach dispose event to something else than
an object.