On Wed, Mar 23, 2005 at 08:24:48PM +0200, Yuval Kogman wrote:
: On Wed, Mar 23, 2005 at 17:43:52 +0200, Yuval Kogman wrote:
: > Hola... I've spend some time these last few days slowly getting
: > currying to work in pugs.
: 
: It should also be mentioned that I made magical $?SUB et al unbind
: the sub.
: 
: In a curried sub, should that happen?
: 
: It looks more consistent for me, because a sub shouldn't know it's
: curried, but you never know in p6 ;-)

I agree, the sub should not have to know it's been curried.  (For
instance, it would certainly call itself assuming its full signature.)
It would be a violation of "excapsulation" to require the sub to
know how it's being used.  Context dependencies should generally be
optional, not forced--anything beyond simple scalar/list dependencies
should probably be the province of explicit calls to want() and
caller().  (Which calls are likely to pessimize various optimizations.)

Larry

Reply via email to