develooper Front page | perl.perl6.language.subs | Postings from September 2000

Re: RFC 212 (v1) Make length(@array) work

From:
Bart Lateur
Date:
September 20, 2000 02:25
Subject:
Re: RFC 212 (v1) Make length(@array) work
Message ID:
030hssg5bfo38c8f5utt4jd8j875qhj7fl@4ax.com
On Tue, 19 Sep 2000 07:40:07 -0700 (PDT), Dave Storrs wrote:

>> 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.

I'm not sure if you really disagree. You said:

>That means that (1) anyone who does _not_ have C experience will
>not have this problem,

Are you saying that only people with experience in C will have this
problem, or is this what you disagree with? Because this is precisely
the argument I have against it.

What I said was: making length(@array) "work" would be catering to
novice people *coming from C*. We shouldn't. Not that much. In Perl, a
string is not an array.

The argument against my reasoning would be if the bulk of people making
this mistake are *not* coming from C. I don't know.

-- 
	Bart.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About