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:
Karl Glazebrook
Date:
September 22, 2000 14:24
Subject:
Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices
Message ID:
39CBCE27.A813EB36@pha.jhu.edu
Ilya Zakharevich wrote:
> You are trading a frequently used shortcut @a == 1 + $#a for a
> rarely-used-but-beautiful/intuitive semantic.  I'm not sure it is a win.

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.

> 
> Moveover,
> 
>   $x = 3 * @_;
> 
> suddently being equivalent to
> 
>   $x = @_;
> 
> does not look very promising...

But would it not be easy to catch and warned by a p5tp6 converter?

> No, you do not use "a special PDL array", you use "a vector".
> A subtle change in wording - and no conflict.

sure, but vector to me means 1D and also some sort of transformation
properties whereas a PDL array is just a N-dim square container.
anyway semantics - we call them 'piddles' which is moderately
amusing but inelegant.


> > This is true, but inelegant. If perl @x arrays are not considered useful
> > why not get rid of them and always use references?
> 
> Actually, this is what Perl is using internally (they are
> softreferences==globs, but who cares?).

Hmmmmmm

Karl

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