On Sat, Jun 20, 2009 at 9:55 PM, Max <span dir="ltr"><<a href="mailto:psykx.out@googlemail.com">psykx.out@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">length could refer to a number of properties as could count and size<br></div>
also all three are used by lots of other languages. elems is a shortend<br>
version of elements which describes accurately what the number returned is.<br>
<br>
Max</blockquote><div></div><div>Out of curiosity, I did a quick google survey of what some other languages call this. The results:</div><div></div><div>java: length<br>javascript: length<br>c#: Length<br>python: len<br>ruby: length<br>
php: count(array), sizeof(array) (sizeof is an alias for count)<br>erlang: size(tuple), length(list), size(array)<br>eiffel: count (I think!)<br><br>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!<br>
</div><div></div><div>Alex</div>