> > but wait, there's more... what does:
> >
> > @multi_dim[$a][$b][$c]
> >
> > give?
> 
> It's representation hiding. I can change my layout from hashes to arrays
> without the clients of my code having to know. :)
> 
> Seriously, the above argument might actually hold some merit when changing
> a matrix to a sparse matrix class, where it's better implemented as a
> hashtable than an array. Users of the matrix wouldn't need to know the
> difference. But that's a rather tenous argument at best.

Interesting application.  Could a tied array intercept multidimensional
calls?  E.g.

tie @matrix, 'MATRIX::SPARSE', 3;

allow the MATRIX::SPARSE object to intercept indicies up to 3 deep?

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Reply via email to