On Sat, Jun 20, 2009 at 9:55 PM, Max <[email protected]> wrote:
> length could refer to a number of properties as could count and size > also all three are used by lots of other languages. elems is a shortend > version of elements which describes accurately what the number returned is. > > Max Out of curiosity, I did a quick google survey of what some other languages call this. The results: java: length javascript: length c#: Length python: len ruby: length php: count(array), sizeof(array) (sizeof is an alias for count) erlang: size(tuple), length(list), size(array) eiffel: count (I think!) I still think 'count' is relatively unambiguous and more obvious than 'elems', but nobody asked me to design Perl 6 - and I'm a little alarmed to be agreeing with PHP about 'count' - so I think I'll shut up! Alex
_______________________________________________ BristolBathPM mailing list [email protected] http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm
