On Sat, Jun 20, 2009 at 9:55 PM, Max <span dir="ltr">&lt;<a href="mailto:psykx.out@googlemail.com">psykx.out@googlemail.com</a>&gt;</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 &#39;count&#39; is relatively unambiguous and more obvious than &#39;elems&#39;, but nobody asked me to design Perl 6 - and I&#39;m a little alarmed to be agreeing with PHP about &#39;count&#39; - so I think I&#39;ll shut up!<br>
</div><div></div><div>Alex</div>