[REBOL] Re: Correct Behaviour? Was False = 2 ????
From: joel:neely:fedex at: 4-Jul-2001 7:34
Jeff Kreis wrote:
> > This part of what you wrote is surely wrong?
>
> Nope. It's absolutely right, I've zeroed in on the solution
> to this confounding dilemma of zeroth principals (or maybe
> that should be "I negative-oned in on it".. hmmm).
>
Much as I hate to say it... ;-)
First
is ordinal, and can map to any number of things
besides the cardinal (or natural) numbers.
The first natural number is zero. In the example I gave
earlier (pardon any typos and forgetfulness regarding Pascal)
var StudentPopulation: array [7..12] of integer;
the first index of StudentPopulation is 7. In The Language
That Must Not Be Named,
int charCount [256];
the first index is 0.
My "first" name is Joel.
And, as I mentioned earlier, the first house in my block
has an index (street number) of 1262.
Finally, to return to REBOL-relevance, when we discussed
the behavior of PICK, some folks were quick to point out
that REBOL allows polymorphism, without insisting that we
indulge in such neologisms as the "truthth" or "falseth"
element in
pick ["say" "what?"] value? to-word "zeroeth"
any more than we insist on having a hidden 2 in the fact
that SECOND gives us a representation of the body of
a function.
Nicht wahr?
-jn-
P.S. I wish you all (wherever you are in the world, and
whatever your origin ;-)
["sleepy" "dopey" "grumpy" "happy" "sneezy" "bashful"
"doc"]
(i.e. "happy" fourth! )
------------------------------------------------------------
Programming languages: compact, powerful, simple ...
Pick any two!
joel'dot'neely'at'fedex'dot'com