Re: Garbage collection in C++
On Nov 18, 9:29 pm, Hendrik Schober <spamt...@gmx.de> wrote:
James Kanze wrote:
On Nov 17, 8:29 pm, Juha Nieminen <nos...@thanks.invalid> wrote:
James Kanze wrote:
Sometimes I get the impression that garbage collection
actually causes people to write *less* modular and more
imperative programs. GC doesn't really encourage
encapsulation and modularity.
Garbage collection doesn't "encourage" anything.
I tend to disagree.
Sorry, but it's a statement of fact. Garbage collection is
just a tool; a piece of code. It can't encourage or
discourage anything.
OO is "just a tool", too.
OO is more than just that.
Doesn't it encourage specific ways to program?
(Note that I do not necessarily defend Juha's position.
I just find yours a very weak argument.)
Yes and no. It's certain that the programming language we use
does condition us to some degree. But garbage collection isn't
a programming language, nor a paradigm. It's just a very low
level tool. As such, it isn't capable of such an effect.
(Perhap Juha is confusing this with the effects of some
programming languages that happen to use garbage collection.
But C++ with garbage collection won't become Java, nor anything
like it. It will remain very much C++.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34