Is there any plans to make working signals in D?
Denis Shelomovskij
verylonglogin.reg at gmail.com
Sun Apr 14 23:12:36 PDT 2013
15.04.2013 7:46, deadalnix пишет:
> On Sunday, 14 April 2013 at 07:06:12 UTC, Denis Shelomovskij wrote:
>> For "working signals" I suppose will be enough fixing of both Issue
>> 9606 [1] and Issue 9603 [2].
>>
>> IMO, for the first issue we need weak references [3].
>> IMO, for the second issue we need to make regular D objects on
>> closures [4] and fix Issue 9602 [5].
>>
>> Any thoughts about my proposal to make signals working in D? Other
>> proposals? Any (approximate) period for [proposal parts] to be
>> implemented?
>>
>> Also, does anybody think currently D has working signals and I'm just
>> slander in the title?
>>
>> P.S.
>> Also there is a proposal for new signals implementation without
>> compiler changes [6].
>>
>>
>> [1] http://d.puremagic.com/issues/show_bug.cgi?id=9606
>> [2] http://d.puremagic.com/issues/show_bug.cgi?id=9603
>> [3] http://d.puremagic.com/issues/show_bug.cgi?id=4151
>> [4] http://d.puremagic.com/issues/show_bug.cgi?id=9601
>> [5] http://d.puremagic.com/issues/show_bug.cgi?id=9602
>> [6] http://d.puremagic.com/issues/show_bug.cgi?id=9347
>
> Can you expand yourself on the subject ? I did followed discussion on
> the topic, and so this thread is quite hard to follow.
My points was:
1. Implement a weak reference (and, better, a weak references array) as
a general utility [3] and don't implement it in every case we need it
(this will make `std.signals` fixing [1] trivial, one will just
supersede incorrect internal weak ref implementation with standard one).
2. Make regular D objects on closures [4] to be able to know when
delegate's outer scope is destroyed (this will auto-fix both [5] and
[2], see Comment 2 of [2] for code example)
I think both points are relatively easy to implement and will improve
things a lot.
--
Денис В. Шеломовский
Denis V. Shelomovskij
More information about the Digitalmars-d
mailing list