RFC: Proposal: Deterministic Object Destruction
MRAB
python at mrabarnett.plus.com
Wed Feb 28 19:45:56 EST 2018
On 2018-03-01 00:14, Steven D'Aprano wrote:
> On Wed, 28 Feb 2018 15:44:45 -0800, ooomzay wrote:
>
>>> Here's one example: reference cycles. When do they get detected?
>>
>> Orphan cycle _detection_ is orthogonal to this proposal.
>
> It certainly is not. Dealing with cycles is why most of the world has
> moved on from reference counters. (Or at least, from using reference
> counters *alone*.)
>
>
>> As cycles are always a symptom of a design error
>
> "Always"?
>
> So, because you personally don't like the with-statement (possibly
> because it is too clear, understandable, explicit and deterministic for
> your tastes?), you want to mandate that everyone else use the clumsy work-
> around of weak references to avoid an artificial and pointless "design
> error" of a reference cycle.
>
> Great. I'm loving this RFC more and more. Not.
>
> Hint: the real world is *full* of cycles. Many problems have to deal with
> cycles. Having to manage those cycles by hand is *awful*, and completely
> unnecessary given that garbage collectors exist that can manage them for
> you.
>
>
>> I personally have little interest in
>> them other than some facility to detect/debug and eliminate them from
>> applications by design (another topic).
>
> And for your next tricks, you'll solve the political problems of the
> Middle East without hurting anyone, and then colonise Mars on a budget of
> ten thousand dollars.
>
Or, if you want something a little more challenging, work on Brexit! :-)
More information about the Python-list
mailing list