Today around 9:38am, Dave Storrs hammered out this masterpiece:

: On Wed, 13 Sep 2000, Hildo Biersma wrote:
: 
: > > =head1 TITLE
: > > 
: > > Make length(@array) work
: > 
: > Counter-proposal: make length(@array) a syntax error. I don't feel like
: > rewarding stupidity, I'd rather teach people how to do things properly.
: 
: 
:       As a general rule, I agree with Hildo that we shouldn't reward
: stupidity. However, the beautiful thing about Perl, the thing that makes
: me prefer it over every other language on the planet, is that it generally
: DWIMs.  For the most part, the natural, intuitive thing works (ok, first
: you have to wrap your head around context and a few other bits of
: weirdness, but THEN it's intuitive).
: 
:       So I ask...if many newbies do this, and not all of them are stupid
: (a very safe statement, statistically), then perhaps this is simply an
: example of "the intuitive way to do it" and we should make it work?

Even though I don't really like this idea, I can give an example of "Newbie to
Perl" behavior.

=begin example

Javascript: some_array.length

Kidie: How do I do 'blah blah' with JavaScript?

Hacker: You can't, it's a server side operation, use Perl.

Kidie: How do I get the length of my array?  I used length( @some_array ) and it
didn't work!

=end

Please understand, allowing this to happen may encorage stupidity, which I am
against.  However, it's probably a common case.

-- 
print(join(' ', qw(Casey R. Tweten)));my $sig={mail=>'[EMAIL PROTECTED]',site=>
'http://home.kiski.net/~crt'};print "\n",'.'x(length($sig->{site})+6),"\n";
print map{$_.': '.$sig->{$_}."\n"}sort{$sig->{$a}cmp$sig->{$b}}keys%{$sig};
my $VERSION = '0.01'; #'patched' by Jerrad Pierce <belg4mit at MIT dot EDU>

Reply via email to