subsetting and .NET (was Re: Python and Ruby: a comparison)

Edward Diener eldiener at earthlink.net
Thu Jan 3 10:45:34 EST 2002


Alex Martelli wrote:

> "Edward Diener" <eldiener at earthlink.net> wrote in message
> news:3C33856F.3050809 at earthlink.net...

>>The language which you ( and so many others ) identify as C++, with its
>>ability to "play havoc with pointers and memory management" has been
>>superceded in the past 7 years by a language whose modern constructs
>>make it nearly impossible to have these problems. The fact that many
>>
> 
> I *beg* your pardon: I'm a Brainbench MVP for C++, "C++ Guru" is one
> of the main roles for which my current employer pays my not inconsiderable
> salary (side by side with similar guruhood for other technologies such
> as COM, network protocols, and Win32 APIs), and I'm perfectly aware of
> ISO C++ strengths (and weaknesses -- mostly, subtlety and complication).


Good for you !


> 
> It's simply untrue that ISO C++'s "modern constructs" ``make it nearly
> impossible to have [memory management] problems'', because those constructs
> need to keep working within an overall conceptual framework where
> memory management is among an application programmer's responsibilities
> and "object ownership" is the fundamental conceptual tool for it.  And
> it's just not an appropriate tool for most application needs (garbage
> collection IS).


The constructs will keep working whatever the conceptual framework is 
since they are now part of the C++ standard library and can be used 
interoperably in any context. And of course your last sentence is just 
your opinion and certainly not mine. GC languages do not seem to 
consider it important to ever control the order of the destruction of 
objects but there is a class of types and situations for which this is 
necessary and the usual solution for implementing this important idiom 
in GC languages ranges from poor to non-existent, although of course it 
need not be.

A large part of this "GC necessity" debate has really to do with the 
design of a language and how much control the programmer should have 
over memory allocation and the construction and destruction of objects, 
what you rightly call "object ownership". Making a blanket statement 
that "object ownership" is "just not an appropriate tool for most 
application needs (garbage collection IS)" doesn't mean anything to me 
since every application, and indeed every module, can be different based 
on its design.


> 
> 
>>so-called C++ programmers do not want to use these very simple and
>>elegant constructs, in favor of more error-prone techniques still
>>supported by the lnaguage for backward compatibility, is not proof of
>>these problems still existing for practiced programmers in the language.
>>
> 
> If somebody's doing "greenfield development" in C++, they're lucky (if,
> in my well-informed opinion, misguided in their language choice).  Most
> commonly, there are legacy subsystems and legacy interfaces to be kept,
> and those won't give you the freedom to use currently-optimal approaches
> (typically template-based ones) everywhere.


A noble argument for supporting subsets of languages as pragmatic 
necessities !


> 
> 
>>Java's doing away with those problems is a red herring, since these
>>problems no longer exist for professional C++ programmers.
>>
> 
> I play the guru and language advisor for almost 200 professional C++
> programmers at my current employer, and I maintain your assertion is
> totally false.


I personally don't care if you are the advisor to god himself on matters 
of C++ or if you are Bjarne Stroustrup in disguise. You are talking to 
someone here who is not the least impressed by all of this "I am an 
important authority" stuff.

And on that note, I will bid this discussion good=bye and seriously wish 
you the best of luck in your programming endeavors.




More information about the Python-list mailing list