scsh-users
[Top] [All Lists]

Re: Object IDs are bad (was: Ousterhout and Tcl lost the plot with lates

To: scsh-news@martigny.ai.mit.edu
Subject: Re: Object IDs are bad (was: Ousterhout and Tcl lost the plot with latest paper)
From: Peter Ludemann <ludemann@inxight.com>
Date: 30 Apr 1997 18:26:04 -0700
Organization: InXight Software, Inc. http://www.inxight.com
ark@research.att.com (Andrew Koenig) writes:

> In article <5k02gh$jhj@lyra.csx.cam.ac.uk> Tony Finch <fanf@lspace.org> 
> writes:
> 
> > In the tree example that you started with, what is wrong with just
> > passing round the whole subtree so that it can be compared with as
> > necessary? Any reasonable implementation will only be passing round a
> > pointer so you lose nothing.
> 
> Because it will compare equal with any other subtree that happens to
> have the same structure, which is not what I want.

But in that case, they are not the *same* subtree; they are different
in some way that you haven't bothered to specify.

Unless, that is, you intend to modify the subtree.  In my experience,
that is almost never a good thing; the potential confusion of updating
a complex structure in-place seldom is worth the small speed-up (some
years ago I talked with the people who built an optimizing compiler
with all kinds of live-dead analysis, reordering of statements, and
register coloring; and that was their opinion also).

-- 
Peter Ludemann          +1.415.813.6806  (fax: +1.415.813.7499)
Software Architect      ludemann@inxight.com
InXight Software, Inc.  http://www.inxight.com
PAHV 105, 3400 Hillview Ave., Palo Alto, CA 94304 

<Prev in Thread] Current Thread [Next in Thread>