Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-19 Thread Chaim Frenkel
"GB" == Graham Barr [EMAIL PROTECTED] writes: GB On Fri, Aug 18, 2000 at 12:25:42AM -0400, Chaim Frenkel wrote: As Graham pointed out, is an lvalue sub supposed to act like a tie or like a variable. GB Both. GB As Damian points out the lvalue sub must return something that can GB be used as

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-18 Thread Graham Barr
On Fri, Aug 18, 2000 at 12:25:42AM -0400, Chaim Frenkel wrote: As Graham pointed out, is an lvalue sub supposed to act like a tie or like a variable. Both. As Damian points out the lvalue sub must return something that can be used as an lvalue. Normal assignment hen happens. So the result

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Andy Wardley
On Aug 16, 8:21pm, Perl6 RFC Librarian wrote: # this is perl6 sub foo :lvalue ($new) { $variable = $new; } A nice idea, but one of the reasons for the original proposal was to make $foo-bar = $x; behave the same as: $foo-bar($x); Your proposal provides a neat solution for

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Buddha Buck
At 07:04 PM 8/17/00 +0200, Johan Vromans wrote: Nathan Wiger [EMAIL PROTECTED] writes: Most of the places I've seen them used really well is if they walk and talk like other forms: $cgi-param($var, @val); # traditional $cgi-param($var) = @val; # lvalue, but same thing I

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Damian Conway
I hate to add a "me too" but I think this is right on. I also think that Nat's proposal and several other discussions overlook some stuff about lvalue subs. Most of the places I've seen them used really well is if they walk and talk like other forms: $cgi-param($var,

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, and wantarray() changes

2000-08-17 Thread Johan Vromans
[Quoting Graham Barr, on August 17 2000, 18:32, in "Re: RFC 118 (v1) lva"] if $b happens to be tied and FETCH returns a different value to what Yes, tie is along the same lines. -- Johan