[Python-3000] Delayed reference counting idea

Giovanni Bajo rasky at develer.com
Tue Sep 19 23:50:34 CEST 2006

Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

>> * An easier C API would significantly benefit the language in terms
>> of more extensions being available and in terms of increased
>> reliability for those extensions.  The current refcount scheme
>> results in pervasive refleak bugs and subsequent, interminable
>> bughunts.
> It's not clear that a different scheme would be much
> different, though. If it's not refcounting, there will
> be some other set of rules that must be followed, with
> equally obscure bugs if you slip up.


> Also, at least half of the boilerplate is due to the
> necessity of checking for errors at each step. A
> different GC scheme wouldn't help with that.

Given that C handles in an equally-bad fashion errors (need manual checks at
every step) and finalizers (need to manually refcount and de-refcount), maybe a
C++Python is in order? ATL helped somewhat with COM refcounting, after all.

Giovanni Bajo

More information about the Python-3000 mailing list