Why less emphasis on private data?

Andrea Griffini agriff at tin.it
Sun Jan 7 09:59:02 CET 2007

Paul Rubin wrote:

 > Yes I've had plenty of
> pointer related bugs in C programs that don't happen in GC'd
> languages, so GC in that sense saves my ass all the time.

My experience is different, I never suffered a lot for
leaking or dangling pointers in C++ programs; and on
the opposite I didn't expect that fighting with object
leaking in complex python applications was that difficult
(I've heard of zope applications that just gave up and
resorted to the "reboot every now and then" solution).

With a GC if you just don't plan ownership and disposal
carefully and everything works as expected then you're
saving some thinking and code, but if something goes
wrong then you're totally busted.
The GC "leaky abstraction" requires you to be lucky to
work well, but unfortunately IMO as code complexity
increases one is never lucky enough.


More information about the Python-list mailing list