Re: Want, wrapper subs and context preservation (Re: RFC 21 (v1) Replace C<wantarray> with a generic C<wa)
[email protected] ("William Campbell") Sun, 6 Aug 2000 22:05:06 +0100
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <000a01bfffea$006f7d80$7617989e@stand> |
> True, but most of those other ways are either irrelevant to this example > (i.e. make no difference to the existing behaviours) or they are sub-cases > of the existing cases (which one might or might nor choose to optimize). > Yes, but how do I know that those other ways will continue to be irrelevant in the future? It would be nice if the wrapper subroutine could be writen in such a way that it can take advantage of any future context dependant behaviours/optimizations that are added to the wrapped subroutine without having to be revisited when those behaviours/optimizations are added. This might be more of a consideration where the two subroutines are maintained by different people than when they are maintained by the same person. Might it be nice to be able to say something like @ret = call_in_my_context &wrapped; In situations like this? William