Re: GC performance - GC fragility
- From: "Bob Dawson" <DeleteThisAndUseMyInitials@xxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 20:51:33 -0600
"Jolyon Smith" wrote
??? Me thinks you're distracted by the inability to challenge the actual
point so instead are offering an unrelated point.
No, I simply gave you an example of indeterminacy: the path from source to
executable is not fully determined by the source alone. And as Craig pointed
out, the 'executable' may not even be the final word on what happens at run
time.
But give the same source to the same version of the compiler and you
will always get the same output.
Compile any program in a .net 2.0 compiler and you'll always get linked into
the same GC code. So what?
The point is that you don't really control the operation of subsystem
code--whether it's in a driver, a GC, or the OS. Sometimes the systems are
statically determinate, sometimes they're not. As I pointed out previously,
in real terms you can't always even know whether a particular piece of
memory is actually 'in' memory or not in a Windows program. So the whole
pretense that ther's an issue about programmers 'controlling' memory use is
silly.
or garbage collection (compiler: add the necessary code to
manage memory deallocations for me).
That is NOT what garbage collection is. The compiler adds nothing to
your code to manage memory allocations.
The Delphi compiler links in calls to handle reference counting, and in .net
your whole program is linked into the runtime where the GC is already
available. Actually, since Delphi also runs your code within a runtime
context, the difference is less than that.
Quite the opposite - it allows
you to REMOVE from your code that memory management in the
hope and expectation that the RUNTIME will clean up after you.
Just as Delphi allows you to remove code to track interface references, or
handle strings efficiently. Yes, in each case reliance on the pre-built
subsystem pulls these mechanical requirements out of your code, allowing you
to get on with the real work. The principle is the same: some parts of the
program's operation are handled by pre-written subsystems..
Don't be ridiculous - it's NOTHING like saying that. A graphics card
has one job to do - display a 2D coloured pixel grid.
A GC has one job to do, constrain memory requirements.
i.e. At all stages something has to say exactly what it needs to be
done.
GC code is also determinate in that sense. GC sweeps happen in accordance
with specific rules, and operate in documented ways. It's just code.
If you're claiming that execution path can be determined strictly by source
code examination, I have to disagree: I write code all the time that
branches based on runtime information. GC code is no more indeterminate than
if not assigned(obj) then
obj := TObject.Create;
In GC you say nothing about what you need to be done - the
GC has to figure out what to do for itself.
Just as I pass a .jpg to a window and the control figures out what it needs
to do to render it. In each case, a subsystem designed for that specific job
handles the details.
A bit like saying that GC enables developers to focus on business
problems is intended to sell GC technology, not actually create business
problem focussed developers.
I don't think it's the compiler/system vendor's job to create business
focused developers, but rather the challenge of those developers to adopt
the technologies that best aid them without letting their egos about 'being
in control' get in the way.
Even so, the loss of direct control has shown too well how disastrous it
can be.
The alternative is not having those tool at all.
"Progress" exmplified through complexity doesn't really look very
attractive, given these examples.
You dis progress if you want to. Personally, I like being my (relatively
advanced) age, desease free, and sitting in a warm house in the middle of a
snowstorm. With a computer controlled thermostat.
The craft is too unstable for a human pilot to fly it. Like it or not,
that's the way software is going as well.
LOL
Not much of a response.
Just as anyone can design a house, but I'd rather live in one designed
by someone that understands wiring, plumbing, load bearing and
weatherproofing.
Anyone can design a mud hut. If you want something more advanced, the
architect is going to use software to specify his structures. Electrical and
plumbing systems will be designed by subcontractors based on general
specs--probably using their own specialized software. It's cheaper, faster,
and much more reliable than one person trying to design it all by hand, no
matter how much credit for expertise he gives himself.
bobD
.
- Follow-Ups:
- Re: GC performance - GC fragility
- From: Jolyon Smith
- Re: GC performance - GC fragility
- Prev by Date: Re: Lino Tadros says Delphi is Dead.
- Next by Date: Re: GC performance - GC fragility
- Previous by thread: Re: GC performance - GC fragility
- Next by thread: Re: GC performance - GC fragility
- Index(es):
Relevant Pages
|
|