Nathan Wiger writes:
> Nonetheless, I think a better thing would be to figure out if it's
> possible to "fix" this issue. I would *really* like lvalue subs ==
> rvalue subs.

I think conflating:
   foo(@vals)
and
   foo() = @vals

is misleading and going to cause more confusion that it solves.

> I strongly disagree with this. You know how many people have problems
> with my? Lots.

What kinds of problems can you possibly have with my()?

> The concept isn't that hard ":lvalue makes it so you can assign to
> subs". But the hard part is deciding *where* it should be used. I think
> it puts an unfair burden on a CPAN author to try and forsee all the
> possible uses of a sub.

My turn to strongly disagree.  Module programmers must decide on an
interface to that module.  Programmers wanting to use the module must
read its documentation to see what that interface is.  There might be
thousands of possible interfaces, and module authors are *NOT* under
any obligation to implement them all.  Lvalue subs do not change this.

> If the author doesn't forsee this, then I have to ask them to patch it.

No, you work with what you have.  Modules, like Perl, don't have to
be all things to all people.  This idea that it "ought to work" is
what's broken.

Here's what I want:

 * Andy's RFC on lvalue subs getting the rvalue as arguments reworked
   to account for the possibility of multiple rvalues.

 * A separate RFC saying what I want.

I'll write the separate RFC now.  Then we can shut up and let Larry
sort it out.

Nat

Reply via email to