We chose to go with bean-style getters and setters across the board, thinking that Sun might have done the same were they to revisit the collections today. Also, wherever possible, we prefer to name methods using an imperative form. "getLength()" is consistent with that approach, and its intent is clear: it gets the length of the sequence. Based on this convention, naming the method "size()" would imply that we want to use the verb form of "size", and that the result of the method might somehow alter the size of the collection, which is not correct.
G On Nov 27, 2009, at 5:46 AM, Noel Grandin wrote: > Hi > > I realise that I'm nitpicking, but why does Sequence have a > getLength() method instead of a size() method? > > My brain is habituated to the normal JDK collections, and I keep > typing size() and wondering why it isn't working. > > Thanks, Noel.