On Mon, 2002-07-15 at 11:29, Karl Glazebrook wrote: > complex formulae. Imagine: > > @solution = (^-@b + sqrt(@b^**2 ^+ 4^*@a^*@c) ) ^/ (2^*@a); > > (or would it be ^sqrt() ?) - This looks like sendmail :-)
I would imagine that non-binary operators would simply have a hyper-form (which could be provided as a module) such as: hypersqrt(@x) or perhaps @x.^{sqrt()} or something like that. > What is wrong with using @a * @b - the only reason I can think is to There's nothing really *wrong* with it. In fact, I see no reason that they can't co-exist: @a = @b * @c if @d == 2; since making hyper-operation context sensitive seems a reasonable thing to me. > Why do we need to preserve @x as array length when you are proposing > @x.length ? This is one of the most common operations performed on arrays. It seems like Perl6 should be hospitable in that respect. > As instigator of PDL, I am very concerned. Clearly inbuilt vectorization > and compact > arrays in perl6 will make PDL obsolete. I have no problem with that. A PDL does much more than that, but of course you know that :) I think a Perl6 re-design of PDL will be much more streamlined, but still essential. > If I was forced to write vector code like this I *WILL* give up on perl, > and resort to Numerical > Python or IDL instead. Sure, that's always an option. I think Perl has a lot going for it other than the way vectorization happens, and with the ability to define your own array behavior, you can pretty much do this however you want anyway.