Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Michael G Schwern
So I thought of a serious problem with part of this RFC. The bit about using indirect object syntax... > Instead, this RFC proposes that C's operation become much more > fundamental, simply translating functions via the existing indirect > object syntax: > >tie Transaction %t

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Nathan Wiger
Michael G Schwern wrote: > > So I thought of a serious problem with part of this RFC. The bit > about using indirect object syntax... > > There's a nasty inconsistency there. Consider the following. > > package Foo; > sub lock { > flock $_[0], LOCK_EX; > } > lock $trans

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Nathan Wiger
Michael Fowler wrote: > > > =head3 Merge C, C, and C into C > > I'm not so sure about this. I'm not either anymore. This will probably be removed from the next version. > > Instead, this RFC proposes that C's operation become much more > > fundamental, simply translating functions via the exist

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Damian Conway
> > It may make sense to pass a leading argument to TIE which is the type > > of variable being tied. > > > > tie Some::Class $foo, @args; > > > > would produce: > > > > TIE('SCALAR', 'Some::Class', @args); Or, better still, pass a reference to the actual variab

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Michael G Schwern
On Sun, Sep 10, 2000 at 04:00:30PM -0700, Nathan Wiger wrote: > > Normally, the Foo::lock() subroutine in the current package will be > > called. However, if %trans is a tied hash to a class which defines a > > lock() method (let's call it Lock::Ness) the meaning of the program > > radically and u

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Michael G Schwern
On Mon, Sep 11, 2000 at 01:31:39PM +1100, Damian Conway wrote: > Or, better still, pass a reference to the actual variable being tied. Good idea. > Also notice that I suggested the TIE be called as a method, > so that it can be inherited if necessary (maybe you had that idea > already???) The

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Nathan Wiger
Michael G Schwern wrote: > > >sub lock { print "Hello!" } > >$trans = new Lock::Ness; > >lock $trans; # $trans->lock > > That's not right. You're correct. Sorry for not double-checking my examples. > the same reasons I've already pointed out. You don't want adding a > method to

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Damian Conway
> > Also notice that I suggested the TIE be called as a method, > > so that it can be inherited if necessary (maybe you had that idea > > already???) > > The tie *can* currently be inherited. Yes, I was aware. It's just that you wrote: >tie Some::Class $foo, @args;

Re: RFC 200 (v1) Objects: Revamp tie to support extensibility (Massive tie changes)

2000-09-10 Thread Michael G Schwern
On Sun, Sep 10, 2000 at 09:22:39PM -0700, Nathan Wiger wrote: > Regardless of my huge error above, this doesn't change the fact that > this is exactly what tie() does currently in Perl 5. That is: > >tie @a, 'Matrix'; >push @a, $stuff; > > Now changes the meaning of push() in the current