On Mon, Apr 08, 2002 at 06:01:57PM +0100, Jonathan E. Paton wrote: > To make the symbols {} and [] aggregate you'd have to > default [] to using hashes - and force it back to > arrays using explicit syntax. You can't automagically > decide that it's never going to be used like a hash. > > I'm I beating this point to death, or do I have to write > the RPC: > > "Keep the {} and [] notation for hashes and arrays" > > or > > "Save our array!"
Whilst I agree with that, I'd also like to find an easy way to allow me to say (OK, in perl5 terms, because I'll make a mistake in perl6 terms) $foo->[$bar]; and after I've written my program decide to swap $foo from being an array into some sort of sparse array, without needing to replace all those [] with {} if my "sparse array" happens to be a hash. Or am I still stuck in perl5, where the "obvious" way to do a sparse array is a hash, because doing tied array implementation is both a) non-lazy and needs patience b) slower while perl6 is going to have fast ways to switch $foo to all manner of array implementations without needing to touch the perl code? [Anyway, what do I know about programming in Perl? I seem to spend more time programming perl. :-) Comments are for wimps, Perl is for regression tests] Nicholas Clark -- Even better than the real thing: http://nms-cgi.sourceforge.net/