Re: lvalue functions and lvalue parameters

2006-06-20 Thread Sam Vilain
Jonathan Scott Duff wrote: >> sub cond(Bool $c, $a, $b) is rw { >> if $c return $a else return $b; >> } >> >> Will this fail because $a and $b are not rw? If so, will it fail at run- >> or compile-time? What about this: >> > That looks like it should be a compile-time failure to me. > De

Re: lvalue functions and lvalue parameters

2006-06-20 Thread Jonathan Scott Duff
I don't have any real answers, but I'll weigh in with my opinion anyway :-) On Tue, Jun 20, 2006 at 10:59:01AM +0100, Daniel Hulme wrote: > I've just thought of an interesting interaction with lvalue functions > and call by foo. What if I want to write, say, an lvalue ?? !! function > thus > > s

lvalue functions and lvalue parameters

2006-06-20 Thread Daniel Hulme
I've just thought of an interesting interaction with lvalue functions and call by foo. What if I want to write, say, an lvalue ?? !! function thus sub cond(Bool $c, $a, $b) is rw { if $c return $a else return $b; } Will this fail because $a and $b are not rw? If so, will it fail at run- or comp