Re: Article of interest: Python pros/cons for the enterprise
- From: Carl Banks <pavlovevidence@xxxxxxxxx>
- Date: Thu, 21 Feb 2008 17:39:29 -0800 (PST)
On Feb 21, 7:17 pm, Jeff Schwab <j...@xxxxxxxxxxxxxxxx> wrote:
Carl Banks wrote:
On Feb 21, 1:22 pm, Nicola Musatti <nicola.musa...@xxxxxxxxx> 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.
If you've already got a generic, language-supported way to manage
resources (like RAII with deterministic destruction), then why bother
with garbage collection?
Because now you have to manage memory? Did you read my post? You
have to manage one thing or the other.
I'm not trying to knock it; it was a big step
up from C-style "who forgot to delete a pointer" games. It just seems
to me like a solution to something that's no longer a problem, at least
in well-written C++ code. I'll take destructors over GC any day.
About 2% of the objects I creat have resources other than memory. I
would rather manage resources of 2% of objects than manage memory of
100%. YMMV, but I suspect mine is the more common opinion, if the
recent (like, 10-year) trend in programming languages is any
indication.
Carl Banks
.
- Follow-Ups:
- Re: Article of interest: Python pros/cons for the enterprise
- From: Jeff Schwab
- Re: Article of interest: Python pros/cons for the enterprise
- References:
- Article of interest: Python pros/cons for the enterprise
- From: estherschindler
- Re: Article of interest: Python pros/cons for the enterprise
- From: Tim Chase
- Re: Article of interest: Python pros/cons for the enterprise
- From: Carl Banks
- Re: Article of interest: Python pros/cons for the enterprise
- From: Bruno Desthuilliers
- Re: Article of interest: Python pros/cons for the enterprise
- From: Nicola Musatti
- RE: Article of interest: Python pros/cons for the enterprise
- From: Ryan Ginstrom
- Re: Article of interest: Python pros/cons for the enterprise
- From: Nicola Musatti
- Re: Article of interest: Python pros/cons for the enterprise
- From: Paul Boddie
- Re: Article of interest: Python pros/cons for the enterprise
- From: Nicola Musatti
- Re: Article of interest: Python pros/cons for the enterprise
- From: Carl Banks
- Re: Article of interest: Python pros/cons for the enterprise
- From: Jeff Schwab
- Article of interest: Python pros/cons for the enterprise
- Prev by Date: Re: KeyboardInterrupt should not kill subprocess
- Next by Date: Re: Article of interest: Python pros/cons for the enterprise
- Previous by thread: Re: Article of interest: Python pros/cons for the enterprise
- Next by thread: Re: Article of interest: Python pros/cons for the enterprise
- Index(es):
Relevant Pages
|