On 22/01/2008, at 10:35 AM, Landon Blake wrote:
I've got a lot of respect for the guys that code in languages like
C and
C++. Using one of those languages is right up there with brain
surgery.
(To think programmers used to be responsible for memory management all
on their own. Where is my garbage collection!)
Hi Landon,
I find languages with garbage collection to be far more difficult
than languages without. When there is no garbage collector, I can set
out allocation and deallocation, using simple reference counting
(which can also be used for distributed processing). When using
garbage collection, nothing is obviously wrong but the program leaks
and leaks until all the memory is used then crashes.
Trying to debug programs with garbage collection consists of a
frustrating series of nulling out variables and then trying to force
the collector to run to work out whether this or that section was
actually the one with the reference, then hunting around for
something that could possibly be holding onto the memory, only to
find that it's some cache in a library that I'm unable to access.
It's whole brain surgery to use garbage collection languages, and it
only takes half a brain to use reference counting. Then when you
consider distributed processing (eg, sending objects between
computers over a network), garbage collection becomes overloaded with
weak pointer references and other hideously complex partial garbage
collection... which is garbage.
I think I could learn and use C if I needed to, although I'm always
tempted to implement a system for managing "objects" whenever I use C
code.
Go ahead and do it... reference counting is very simple.
I avoid C++ like the plague. :]
Good idea! Get a Mac and try Objective C.
used the language. It did teach me a lot about how object-oriented
programming languages run under the hood.
No, C++ doesn't do that.
Python, and even Ruby. (I couldn't believe how easy it was to open a
text file in Ruby.)
c = fopen("file.txt", "r");
--
[EMAIL PROTECTED]
_______________________________________________
Geowanking mailing list
[email protected]
http://lists.burri.to/mailman/listinfo/geowanking