24.04.2013 12:47, deadalnix пишет:
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.

Thus making that "something else" almost class but not class and I don't see why not just use class instead of creating a new entity.

--
Денис В. Шеломовский
Denis V. Shelomovskij

Reply via email to