Re: Destructor attribute inheritance, yea or nay?

2017-05-27 Thread Stanislav Blinov via Digitalmars-d
On Saturday, 27 May 2017 at 13:32:57 UTC, Adam D. Ruppe wrote: On Saturday, 27 May 2017 at 10:11:38 UTC, Stanislav Blinov wrote: 3. Nobody actually cares. That's me. I think the @attribute mess is completely broken and mostly just ignore it. Hm. That's a strategy, perhaps I should try it

Re: Destructor attribute inheritance, yea or nay?

2017-05-27 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 27 May 2017 at 10:11:38 UTC, Stanislav Blinov wrote: 3. Nobody actually cares. That's me. I think the @attribute mess is completely broken and mostly just ignore it. That said, I do agree with you: it SHOULD work like you describe if we want the @attributes to be meaningful.

Re: Destructor attribute inheritance, yea or nay?

2017-05-27 Thread Stanislav Blinov via Digitalmars-d
On Monday, 22 May 2017 at 17:05:06 UTC, Stanislav Blinov wrote: I'd like to hear what you guys think about this issue: https://issues.dlang.org/show_bug.cgi?id=15246 Any thoughts? By the absence of replies from those who (I think) should care I conclude that either: 1. I'm saying

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Stanislav Blinov via Digitalmars-d
On Friday, 26 May 2017 at 18:58:46 UTC, Igor Shirkalin wrote: First, why 'oblivious' function does not free Malicious object (no matter GC or not GC). It actually does matter. It doesn't manually release the resources precisely because it relies on the GC. I've made it overly explicit, but

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Igor Shirkalin via Digitalmars-d
On Friday, 26 May 2017 at 17:48:24 UTC, Stanislav Blinov wrote: I'm sorry, I ment explicitly. I hope it is not possible. It is very possible, and it should be possible, otherwise we couldn't even think about deterministic destruction. Hm, you've said it is decision of GC (see bellow), so how

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Stanislav Blinov via Digitalmars-d
On Friday, 26 May 2017 at 17:32:38 UTC, Igor Shirkalin wrote: On Friday, 26 May 2017 at 17:17:39 UTC, Stanislav Blinov wrote: Destructors of derived classes are called implicitly on finalization. The net effect is that such finalization adopts the weakest set of attributes among all the

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Igor Shirkalin via Digitalmars-d
On Friday, 26 May 2017 at 17:17:39 UTC, Stanislav Blinov wrote: Destructors of derived classes are called implicitly on finalization. The net effect is that such finalization adopts the weakest set of attributes among all the destructors it calls. I'm sorry, I ment explicitly. I hope it is

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Stanislav Blinov via Digitalmars-d
On Friday, 26 May 2017 at 17:08:40 UTC, Igor Shirkalin wrote: On Monday, 22 May 2017 at 17:05:06 UTC, Stanislav Blinov wrote: I'd like to hear what you guys think about this issue: https://issues.dlang.org/show_bug.cgi?id=15246 [...] If your destructor is not @safe and @nogc, why not to

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Igor Shirkalin via Digitalmars-d
On Monday, 22 May 2017 at 17:05:06 UTC, Stanislav Blinov wrote: I'd like to hear what you guys think about this issue: https://issues.dlang.org/show_bug.cgi?id=15246 [...] If your destructor is not @safe and @nogc, why not to make it be the same or call inherited destructor implicity?

Re: Destructor attribute inheritance, yea or nay?

2017-05-26 Thread Stanislav Blinov via Digitalmars-d
On Monday, 22 May 2017 at 17:05:06 UTC, Stanislav Blinov wrote: Considering that the core runtime component - the GC - is the one that usually handles finalization, it follows that *GC collection can never be @safe*. And since collection only happens during allocation, it follows that

Destructor attribute inheritance, yea or nay?

2017-05-22 Thread Stanislav Blinov via Digitalmars-d
I'd like to hear what you guys think about this issue: https://issues.dlang.org/show_bug.cgi?id=15246 Marco argues that because "it currently doesn't work that way" (i.e. destructors are not inherited), the bug is invalid. However, what this means in practice is: - destroy()/rt_finalize()