[Issue 9601] Make regular D objects on closures

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 27 05:20:43 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9601


Maxim Fomin <maxim at maxim-fomin.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxim at maxim-fomin.ru


--- Comment #1 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-02-27 05:20:41 PST ---
(In reply to comment #0)
> The idea is to make created delegate data pointer referring to a valid D object
> just like for class member function.
> 
> It will allow passing closure delegate to functions where such objects are
> expected and controlling/watching delegate lifetime.
> 
> Once it will be implemented the only "raw" delegates would be struct member
> function delegates? which are used rarely and can easily be avoided.

Please elaborate on "to make created delegate data pointer referring to a valid
D object just like for class member function". I see no point here since it is
always possible to do:

delegate dg = ...;
dg.ptr = whatever is valid - class for member-function, frame for non-member
one
dg()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list