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

Re: logical ops on arrays and hashes

Thread Previous | Thread Next
From:
Christian Soeller
Date:
September 12, 2000 14:24
Subject:
Re: logical ops on arrays and hashes
Message ID:
39BE91C6.F67F32C1@auckland.ac.nz
Jeremy Howard wrote:
> >
> Of course they have reasonable meanings for arrays--element-wise operations
> (RFC 82):
> 
>   http://tmtowtdi.perl.org/rfc/82.html
> 
> Any operation you can do on a scalar you should be able to do element-wise
> on a list, and certainly it's not hard to come up with situations where this
> is useful for non-short-circuiting bitwise operators. Bit vectors and
> associated masks may well be stored in lists, for instance.
> 
> This discussion should probably be on -data, BTW.

Wouldn't it be very useful if all of the applicable polymorphic methods
of RFC 159 would be overloadable for nD arrays (arrays becoming
effectively instances of array objects)? I am not sure if this has been
discussed before but I could think of a whole lot of applications. Often
you might want to do just that with the suggested multidim arrays. Or is
that already suggested in some other way? 

  Christian

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