On Mon, 18 Sep 2000, Bart Lateur wrote:
> On 13 Sep 2000 07:07:42 -0000, Perl6 RFC Librarian wrote:
>
> >Many newbies think of the number of
> >elements in an array as its "length"
>
> Doesn't this reflect C's idea of "a string is an array of characters"?
> Which isn't the idea behind strings in Perl. The basic idea is wrong.
> Therefore, making length(@array) work, would be a wrong signal.
I personally do not see the connection, but even if I did I would
still respectfully disagree. This "wrong signal" would only be sent in
the case that someone (a) has some knowledge of C so that they know what a
string is "under the hood" and (b) is enough of a Perl newbie to not
understand that length is not used to get the number of elements in an
array. That means that (1) anyone who does _not_ have C experience will
not have this problem, (2) anyone who is moderately experienced at Perl
will not have this problem. As soon as someone discovers that
print("100"+2) is valid in Perl and prints 102, they should realize that
Perl is different from C.
Dave