[REBOL] Re: TUPLE! DATA-MODEL & OTHER VALUES
From: joel:neely:fedex at: 15-Jun-2001 2:05
One minor quibble, and one major point of apparent agreement,
Carl Read wrote:
> >> Because tuples are like integers "simple" (to use Holger's
> >> term)... modified seems the most likely as it'd save on
> >> garbage collection.
> > I *really* doubt that inference. Garbage collection applies
> > to dynamically allocated data structures, which are usually
> > managed through some variation of pointers, handles, or
> > references (whether automatic or not). If (e.g.) tuples are
> > non-reference data, it's hard for me to imagine how garbage
> > collection has anything to do with it.
> Well, my feeling is that if you replaced the tuple, the one
> you replaced would be left hanging around and in need of
> discarding in one way or another.
We've agreed (because Holger said so ;-) that integers and
tuples are both "simple". So let's get as "simple" as we can.
I would hope we agree that, after the second of these is
evaluated, there is not a 17 "left hanging around". It's
(simply ;-) GONE because the same bits that used to represent
the 17 have been recycled to represent the 42.
If that's the case, and if integers and tuples are both "simple"
values, then the same logic should apply; there would be no
old tuple somehow "hanging around".
> > You're certainly entitled to say that it makes no difference
> > to you, but others (including me) may have more of an
> > interest.
> My point is that with "simple" datatypes, REBOL could be
> either modifying or replacing them and we couldn't tell
> either way.
Rephrasing in terms of REBOL "particle physics", I don't know
of any piece of REBOL code whose evaluation would provide
different results, depending on whether modification or
replacement were the effect of
However, your next comment hits the (my) nail squarely on the
> The mental model to have though would be that they've been
> modified, as there's no way (as far as I know) to get at the
> original again.
I am concerned with making that mental model as simple as
possible, for learnability, teachability, and usability.
Please see my most recent post in the "mutability and
sameness" thread for why I feel that the distinction (even
if not directly testable in REBOL code) make a big difference
in the kinds of models needed to describe REBOL.
Programming languages: compact, powerful, simple ...
Pick any two!