At 12:38 PM 8/25/00 -0600, Nathan Torkington wrote:
>Dan Sugalski writes:
> > The operative word in that last sentence is "Currently"...
> >
> > >The problem is that you can tie() an array, but an object is a scalar.
> > >Also, there are many array operations (push, pop, etc) still not
> > >supported by tie.  tie makes assumptions about arrays that are perhaps
> > >not valid with pdls.
> >
> > Tie will have a more comprehensive implementation in perl 6, I expect. And
> > it may not be the method used to do this magic. (variable vtable functions
> > should be writable in perl)
>
>Yes, but you're handwaving.  If we don't come up with a way to address
>these issues by saying "this is what we want to be possible, this is
>how it might be done", this list will just spin and talk and discuss
>and debate without any idea of when it's done.

Sure, it's handwaving, but it's handwaving with a purpose. What I don't 
want is for people to get bogged down by the limits of what perl 5 
provides, or what looks to be some sort of reasonable extrapolation 
of  those features.

If a fully working tie's what you need, then ask for it.
If full overloading on non-objects is what you need, then ask for it.
If making objects look like non-objects is what you need, then ask for it.

Basically if you want to be able to say:

   my Matrix @foo, @bar, @baz : bounds(5,5,5);
   # init foo and bar here
   @baz = @foo * @bar;

to make foo and bar 5x5x5 matricies that you casn multiply to get baz then, 
well, say it. If that means you need to define a way to provide overridden 
operators in the Matrix package, then go for it and say that.

Let the -internals folks worry about the Weird Magic needed to implement 
what you want. (This is a variation of my standard "Don't get hung up on 
the implementation, that's my job" speech)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to