Python vs Ruby

Yukihiro Matsumoto matz at zetabits.com
Thu Jan 25 23:25:18 EST 2001


Hi,

Martin von Loewis <loewis at informatik.hu-berlin.de> writes:

|Incorrect is the claim
|  Ruby has "real" garbage collector, not ref-counting.
|
|While this is correct also, it implies that Python has ref-counting
|and no "real" garbage collector, which is not true for Python 2.0.

Python evolved.  I shall update the page.

  Ruby uses mark-and-sweep GC unlike Python's ref-counting GC.

|The implication of the conclusion
|#  Not subject to memory leaks like ref-counting is. 
|
|is likewise incorrect - in Python 2.0, the memory leaks of reference
|counting disappear also.

The leaks I meant were two fold:

  * circluar references
  * wrong ref-counted objects, mostly by extension bugs.

The former disappeared in Python 2.0.  But the latter still remain.
Correct me if I'm wrong.

|I don't know how exactly GC works in Ruby - it is likely that
|it suffers from things that people would consider as drawbacks, though.

Maybe, maybe not.

Regards,

							matz.



More information about the Python-list mailing list