Karl Glazebrook wrote:
> 
> Jon Ericson wrote:
> > But @ and % provide important context clues (if not to perl than
> > certainly for programmers).  We could also eliminate the plural case in
> > English, but this would be endlessly confusing for native speaker
> > (err... speakers).  Why not change @x so that it can represent other
> > types of arrays?  For instance:
> >
> >   my @x;        # standard Perl array
> >   my @y[2, 3];  # 2x3 matrix (syntax guess)
> >   my FIFO @z;   # FIFO stack (another guess)
> 
> or one could just *use* english plurals...
> 
> my $speaker = 'Jim';
> my $speakers = ('Fred','Bill','Sally','Betty');
> 
> my $male_speakers = $speakers[0:1]; # If perl supported this style of range - see 
>RFC coming soon
> 
> # BUT:
> 
> my $image = read_huge_2d_list_of_numbers('file');
> 
> my $favorite_pixels = $image[10:20,50:100];
> my $best_pixel      = $image[11,55];

I've spent almost a day trying to come up with a polite response to this
suggestion.  I have started this mail 3 or 4 times but deleted what I
wrote because it was too sarcastic, angry or dismissive.  This RFC
strikes to the very heart of Perl as far as I'm concerned.  

Judging from your posts, you use perl largely in conjunction with PDL
[1].  As I understand the situation, PDL uses objects (blessed scalar
references) to manipulate arrays because the standard perl array is
inadequate for the task.  Therefore, in your experience '@' is only used
for a limited, rarely needed array and '$' for a wide variety of useful
arrays.  Hence this RFC.

It seems to me that you could have picked a different slant on this
RFC.  Instead of forcing Perl to look like PDL, you could have proposed
that perl allow PDL to look like Perl.  PDL wouldn't exist if there
wasn't something about Perl that people love.  Otherwise, they would be
working on FORTRAN or C or IDL.  If perl can make another group of
people happy, so much the better.  But you have to realize that this
change would make a large number of people miserable.

Could you rework this RFC to be a pragma?  Or propose making @ work with
other types of arrays?  Or withdraw it?  The current form is offensive
to me (and I suspect many other perl programers as well).

[1] "PDL (``Perl Data Language'') gives standard Perl the ability to
compactly store and speedily manipulate the large N-dimensional data
arrays which are the bread and butter of scientific computing." --
<http://pdl.perl.org>)

Jon
-- 
Knowledge is that which remains when what is
learned is forgotten. - Mr. King

Reply via email to