In message
<[EMAIL PROTECTED]>, Nick
Apperson <[EMAIL PROTECTED]> writes
WARNING: This digresses into a rant by the end... You've been warned.
If you like to have your garbage collected for you then use one of the
management strategies present in C++. If you like delayed freeing,
overload new or use a library that does this. Really, the difference
between C++ and most other programming languages (that are strongly
typed) is that C++ doesn't make any assumptions about what you are
going to do with it because of its most basic principle: you don't pay
for what you don't use. If you want garbage collection, you can have
it: it's not like C++ prevents this. By the same token, Java and C#
don't allow you to make any decision here which might be best in
certain circumstances, but it certianly isn't always ideal. If you
want the subset of features that say java has, you are welcome to
create these restrictions in C++ all while remaining more portable.
I personally use garbage collection every once in a while in my C++
code. It is not usually the right tool for me, but there are
circumstances where it makes sense. I generally use it when I have
data that isn't really owned by any object. It is data that many parts
of the program reference and some wish to keep a copy for themselves.
This is how the std::string class is implemented in C++. Reference
counting and copy on write.
But I'll be damned if Java takes over the world because there are
programmers that don't know when they need to use garbage collection.
If you can't avoid memory leaks, fine, don't use C++ or C, but don't
blame the language. You could use garbage collection if you need it;
don't make us all stoop to your level of competency and don't try and
claim that your language is just as fast when it isn't.
- Nick
I read this to the end, looking forward to finding a good rant. But
everything you have said is entirely reasonable.
Nick
--
Nick Wedd [EMAIL PROTECTED]
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/