[REBOL] Re: Core 2.5.5 Beta Versions
From: joel:neely:fedex at: 24-Feb-2003 10:57
Hi, Gabriele,
Perhaps the fact that we're on opposite sides of the Greenwich
meridian causes us to look at it from a different perspective
(but at least we're both in the Northern hemisphere... ;-)
Gabriele Santilli wrote:
> I get accused of being too "implementation dependent", but when I
> try not to be I get accused of not being. ;-) Out-of-range series
> are an implementation artifact. From an "abstract" point of view
> they make no sense. (IMHO)
>
>From my "abstract" POV, the phrase "the third child in the family"
is a reasonable phrase, even when the phrase "the family" is allowed
to take different meanings at different points in time. Even if we
are (at the moment) discussing a one-child family, I see no problem
with asking "Which child have we been talking about during this
conversation?" and being told "The third one."
Suppose we were looking at a specimen family and noticed that the
third child was the first one to catch the measles. We then began
looking through census and medical data to see how frequently the
study child
(third by age) was first to contract measles. At a
point in that search where we are looking at a one-child family,
the question "Does this family have a study child?" can be
meaningfully asked and answered ("no"). Likewise the question "Who
is the study child in this family?" can be meaningfully asked and
answered ("There isn't one.") [* see footnote]
In the same way, I think of the phrase "the third position of the
series" as a reasonable (abstract, non-implementation-dependent)
phrase, even when the phrase "the series" is allowed to take
different meanings at different points in time. Even if we are (at
the moment) discussing a one-element series, I see no problem with
asking "Which element have we been examining through this reference?"
and being told "3".
To continue the parallel, the question
length? this-series >= index? positioned-series
could be meaningfully asked and answered (FALSE). Likewise the
question
first positioned-series
could be meaningfully asked and answered (NONE). REBOL already does
this using some "turns of phrase", as in
pick [1] 3 ; == none
I'm simply asking for consistency. Letting NONE universally represent
There is no answer to your question.
would seem to me to be a big
step forward, and *away* from what I consider to be unnecessary,
confusing, and implementation-dependent inconsistencies, such as
>> third [1]
** Script Error: Out of range or past end
** Where: halt-view
** Near: third [1]
IMHO, evaluating
>> a: [1 2 3 4 5] ; == [1 2 3 4 5]
>> b: at a 3 ; == [3 4 5]
is equivalent to saying "Let B refer to the data of A at the third
position." and that meaning should be able to survive e.g.
>> clear next a
== []
but, of course, it currently can't.
>> index? b
** Script Error: Out of range or past end
** Where: halt-view
** Near: index? b
even though I *can* phrase a question about the equivalent concept
(the third position of the data in A) and get a calm answer
>> pick a 3
== none
that essentially means "There's not one." instead of hysteria.
-jn-
[* footnote] In our hypothetical "third child" scenario, if asked
about "the study child" of a one-child family, I'd be
very disappointed if my associate burst into hysteria and ran from
room shrieking "You can't say that anymore!!!". Likewise, I'd be
disappointed if my associate refused to answer the question "Which
child have we been talking about in each family?"
However, I'd be truly horrified if my assistant dealt with the
one-child situation by giving me information about the first/only
child of the family and making the secret resolution to tell me
thereafter about the first child of any subsequent family.
--
----------------------------------------------------------------------
Joel Neely joelDOTneelyATfedexDOTcom 901-263-4446
Counting lines of code is to software development as
counting bricks is to urban development.