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

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
September 22, 2000 16:08
Subject:
Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices
Message ID:
20000922190758.A6887@monk.mps.ohio-state.edu
On Sat, Sep 23, 2000 at 10:01:11AM +1100, Jeremy Howard wrote:
> > It's now boiling down to a matter of opinion and we'll have to agree to
> > differ. Of course I use array arithmetic all the time as a heavy PDL
> > user.

> It's not just for number-crunchers either. Array notation greatly simplifies
> many frequently used operations. For instance (from RFC 82):
> 
>   @people = ('adam', 'eve ', 'bob ');
>   @scores = (7,9,5);          # Score for each person
>   @histogram = '#' x @scores; # Returns ('xxxxxxx','xxxxxxxxx','xxxxx')
>   print join("\n", @people . ' ' . @histogram);
> 
>   adam xxxxxxx
>   eve  xxxxxxxxx
>   bob  xxxxx

Are you trying to convince me/us that is going to be used often?

> Array notation is not 'rarely used' in languages that support it--in fact,
> operations are applied to arrays and lists at least as often as scalars in
> most code I see written for Mathematica, J, PDL, and so forth.

a) You can *already* use vectors as scalars in Perl;
b) What we are discussing is Perl, not Mathematica, J, PDL, and so
   forth.  These languages have a very narrow niche.

Ilya

Thread Previous | Thread Next


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