[Jprogramming] index origin 0

Mike Day mike_liz.day at tiscali.co.uk
Mon Jul 26 01:00:32 HKT 2010


I don't think Graham Parkhouse has commented (as a Briton) so I'll just 
confirm
that the first floor is up the first flight of stairs. However, we 
don't say "zeroeth"
floor unless we're being nerdish or silly - that's the "ground" floor 
for us. I
suppose you could discuss the background of the word "ground" in this 
context. 
I'll list my background if I get round to making substantive comments!
Apologies if this has already been answered. Also that this should 
perhaps be
in the "Jchat" category.
Mike
Don Guinn wrote:
> Isn't the floor above the ground floor numbered "1" or "first" in Great
> Britain?
>> On Sat, Jul 24, 2010 at 9:00 AM, Leigh J. Halliwell <leigh at lhalliwell.com>wrote:
>>>> Dear J Forum:
>>>> Occassionally the zero index-origin trips me up; however, it's one of the
>> peculiarities of the language that I accept (like 0%0 = 0, rather than _.)
>> in order to use the power of J. I accepted it in APL, and I accept it in
>> J.
>> Besides, most of the time I replace elements in an array after an "i."
>> search, which handles the base consistently. So I think that J developers
>> will make better use of their time than to add an option for 0/1 indexing.
>>>> Moreover, my degree was in pure mathematics. In set theory one begins with
>> the empty set as zero, and defines the next integer (n+1) as the union of n
>> and {n}. So the integer (n+1) is essentially the set of integers from zero
>> to n. In that regard, counting from zero is mathematically pleasing.
>>>> That said, I'll never be so gung-ho about the custom as to start lists with
>> zero, as, for example, in the chapter numbering of Ken Iverson's Concrete
>> Math Companion -- although I might be tempted label a Forward or an
>> Introduction as Chapter 0). Zero developed in the late middle ages, after
>> 'first' was established as the leading item. I still bristle at using the
>> adjective 'zeroeth'.
>>>> Sincerely,
>>>> Leigh
>>>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>>


More information about the Programming mailing list

AltStyle によって変換されたページ (->オリジナル) /