[REBOL] Re: TUPLE! DATA-MODEL & OTHER VALUES
From: joel:neely:fedex at: 13-Jun-2001 8:50
Hi, Carl,
Let me respond to a couple of statements. I'll take them out
of order, as I suspect one to be relevant to more folks than
the other.
Carl Read wrote:
> On 13-Jun-01, Joel Neely wrote:
>
> > Holger Kruse wrote:
> >>
> >> Tuple:
> >>
> >> a: 1.2.3
> >> b: a
> >> a/1: 0 ;Changes 'a only. 'a and 'b do not share data.
> >> a
> >> == 0.2.3
> >> b
> >> == 1.2.3
>
> > If you'll just clarify whether you meant that
>
> > "The tuple in 'a has been modified."
>
> > or
>
> > "The tuple in 'a has been replaced."
>
...
> 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.
> Because tuples are like integers "simple" (to use Holger's
> term), I have a feeling the answer is that it makes not a
> jot of difference to the REBOL programmer.
>
You're certainly entitled to say that it makes no difference
to you, but others (including me) may have more of an interest.
This thread arose from an attempt to understand the behavior
of SAME? and EQUAL? with respect to the various data types.
Understanding how the parts of our language fit (and work)
together would seem to contribute to using the language more
effectively.
There are many places where REBOL exhibits seeming subtleties and
inconsistencies. Understanding how the parts of our
language fit (and work) together would seem to help a programmer
(of any flavor ;-) avoid any unnecessary (and unpleasant)
surprises regarding the behavior of his/her program.
I am not "a REBOL programmer". I am a programmer who uses
many languages, of which REBOL is one. Understanding how the
parts of our language fit (and work) together, and doing so in
terms of standard computing concepts and terminology, helps
with the choice of which lanaguage(s) is/are appropriate for
a given task, and helps translate an algorithm expressed in
one language into another.
I have several friends who teach in higher education. I am on
the advisory committees for two computer engineering curricula.
I would love to be able to recommend REBOL as suitable for
teaching (and perhaps even research in) computer programming,
but cannot yet do so. One of the reasons is the current absence
of a complete model for REBOL semantics. Whenever one has a
language where the most effective response to a question is
I don't know; let's try it and find out.
one has a language
that is not ready for prime time, at least educationally.
Those are a few (though not all) of my motivations for being
interested. Anyone not interested in any of the above issues
is certainly free to ignore the whole discussion. ;-)
-jn-
------------------------------------------------------------
Programming languages: compact, powerful, simple ...
Pick any two!
joel'dot'neely'at'fedex'dot'com