Gordon Burditt said:
[snip]
But, to continue the analogy, sometimes the automatic transmission
does it wrong when you're towing a trailer (hiding pointers where
the gc can't find them). Either it ruins the engine (frees memory
that should NOT be free), or it slows down horribly (spends enormous
amounts of time looking for pointers where they aren't) and takes
24 hours to get home. And there's no practical way to fix this
without putting restrictions on how you drive.
Yes, but I can go farther because I am less tired you see?
Automatic driving requires less efforts from the driver and he/she
can drive longer distances!
For instance, I added the GC to the debugger/IDE of lcc-win32.
Because I do not have to write any code to cope for free() bugs or
problems, I used the saved time to improve the application itself.
I concentrated in the debugger itself, a *very* complex application.
Real time, with 3 threads running (debugger IDE, program under
debug, and debugger itself), with many complex specs to read the
debug info, messages that must be formated at each break, etc etc!
Now, I know that I can allocate a buffer whenever I need one, and
that I can pass it around without caring where I will free the stuff!!!
Debugging the debugger is difficult. Without the GC I would have been
slowed down by all those accounting chores and would have had less
time to try to improve it.
Besides, the crashes due to messing around with free would be
inacceptable. A debugger crashing, what a nightmare
I spoke once with a TAXI driver (!!!) with manual driving. I told him:
Look, it doesn't hurt your hand at the end of the day?
You do not get feed up?
He admitted that it hurt a bit, but then he started telling me all
the bad things that stupid automatic drivers
do, that they do not know their vehicle etc etc.
I said nothing, payed and got out. There must be all kinds of people to
fill this world. It is his opinion. I respect it.
jacob