Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!newsfeed.internetmci.com!howland.reston.ans.net!torn!nott!cunews!dbuck
From: dbuck@superior.carleton.ca (Dave Buck)
Subject: Re: Object returned by methods on Collection
X-Nntp-Posting-Host: superior.carleton.ca
Message-ID: <DJH2wt.CqD@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University, Ottawa, Canada
References: <9512051248.AA05935@sobrino.eui.upm.es> <30C7E2AB.548@ios.com> <4a9vj7$na8@watnews2.watson.ibm.com> <4aji2g$lku@gap.cco.caltech.edu>
Date: Tue, 12 Dec 1995 12:05:17 GMT
Lines: 25

In article <4aji2g$lku@gap.cco.caltech.edu>,
Michael S. Klein <mklein@alumni.caltech.edu> wrote:
>It is also kind of annoying that collections are 1-based instead of zero-based,
>especially since streams are zero-based, but I think were all going to have to
>live with that one...

I normally consider the 1-based collections to be an advantage since
that's what I want more often.  There's much less confusion about the
number of elements in the collection (it's the same as the last index)
and makes it easier to talk about the fifth element of a collection
(not the one indexed at 4).

I don't consider streams to be zero or one based since their protocol
is based in position: rather than at: and at:put:.  I normally never
need to refer to or set a stream's position directly and can get by
with skip:, next, etc.

David Buck
dbuck@ccs.carleton.ca

_________________________________
| David K. Buck                 |
| dbuck@ccs.carleton.ca         |
| The Object People             |
|_______________________________|
