Article of interest: Python pros/cons for the enterprise

Nicola Musatti nicola.musatti at gmail.com
Fri Feb 22 05:56:25 EST 2008


On Feb 22, 12:24 am, Carl Banks <pavlovevide... at gmail.com> wrote:
> On Feb 21, 1:22 pm, Nicola Musatti <nicola.musa... at gmail.com> wrote:
>
> > There are other downsides to garbage collection, as the fact that it
> > makes it harder to implement the Resource Acquisition Is
> > Initialization idiom, due to the lack of deterministic destruction.
>
> That's not a downside: it's at least a wash.
>
> In C++ you manage memory and the language manages resources.  In
> Python you manage resources and the language manages memory.
>
> RAII is merely one way of minimizing complexity.  Garbage collection
> is another way.

In C++ memory is just another resource which you can handle just like
any other one, possibly using RAII. GC deals with memory very
reasonably, but makes it more complicate to deal with other resources.

Cheers,
Nicola Musatti



More information about the Python-list mailing list