|
|
Warp wrote:
> What I wonder is why everyone talks like there wouldn't be any negative
> sides to GC.
Here's the thing: If you could find all the root pointers in a C++
program and know which things pointed to what, you could add GC to C++
pretty easily without losing any functionality. GC is a strict superset
of what C++ gives you, avoiding much of the copying and most or all of
the errors that C++ leaves you open to.
And it's not like C++ keeps you from leaving resources hanging around. I
have a C++ program right now that you sure better make sure the client
can talk to the server, because if it can't, the client leaves the
broken socket open, only to run out of sockets and crash out some time
later.
I "fix" this by exec'ing the program in a separate process from a
program in a GCed language, watching for the debug output to stop, and
respawning the program when it dies. :-)
--
Darren New / San Diego, CA, USA (PST)
Remember the good old days, when we
used to complain about cryptography
being export-restricted?
Post a reply to this message
|
|