On Wed, Aug 16, 2000 at 10:59:38AM +0100, Piers Cawley wrote: > Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > > This RFC proposes that lvalue subs, when invoked as such, should receive > > the rvalue being assigned to it as an argument. > > I'm kind of in two minds about this. Most of the time the current > lvalue behaviour does pretty much the Right Thing, and simple lvalue > subs are simple to write. If you end up with the rvalue as an extra > argument you end up having to dance around whether or not the sub is > called in an lvalue context to possibly decide what to do with the > argument. Passing the lvalue via some other means eliminates this problem. I forget who suggested it (Buddha Buck?) but sub foo : lvalue($value) { ... } where $value is a reference to the thing we're assigning seems like a Good Idea to me. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]
- Re: Make lvalue subs the default... Nathan Torkington
- Re: Make lvalue subs the def... Nathan Wiger
- Re: Make lvalue subs the def... Nathan Torkington
- Re: Make lvalue subs the def... Nathan Wiger
- Re: Make lvalue subs the def... Graham Barr
- Re: Make lvalue subs the def... Chaim Frenkel
- Re: RFC 107 (v1) lvalue subs should recei... Buddha Buck
- Re: RFC 107 (v1) lvalue subs should r... Chaim Frenkel
- Re: RFC 107 (v1) lvalue subs sho... Buddha Buck
- Re: RFC 107 (v1) lvalue subs should receive the rvalue... Piers Cawley
- Re: RFC 107 (v1) lvalue subs should receive the r... Jonathan Scott Duff
- Re: RFC 107 (v1) lvalue subs should receive t... Piers Cawley
- Re: RFC 107 (v1) lvalue subs should receive t... Chris Nandor
- Re: RFC 107 (v1) lvalue subs should recei... Chaim Frenkel
- Re: RFC 107 (v1) lvalue subs should r... Nathan Torkington
- Re: RFC 107 (v1) lvalue subs should receive t... Andy Wardley
- Re: RFC 107 (v1) lvalue subs should recei... Buddha Buck
- Re: RFC 107 (v1) lvalue subs should receive the rvalue... skud