From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Sat, 30 Apr 2005 10:40:12 +0200
Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > I'd appreciate any gentle nudges towards the appropriate documentation, > source file, or answer. Thanks! I've now created a test for it in t/pmc/object-meths.t: .sub go method ... P2 = self tailcallmethod "go" .end Works. But that's not really optimal. Should the invocant be implicitely "self" . . . Why limit method tailcalls to self? Or to single dispatch? . . . and/or do we need a more general syntax: .pcc_begin .arg x ... .invocant o tailcallmethod "foo" .pcc_end How about a unified ".pcc_tailcall" pseudo-op as an alternative to the pcc_results production? That should cover all of the pcc_call cases at once. And maybe even foo(x, ...) @TAIL_CALL # tail function call o.foo(x, ...) @TAIL_CALL # tail method call > Pm leo How about extending ".return" to cover these: .return foo(x, ...) # tail function call .return o.foo(x, ...) # tail method call Otherwise, it may be easier to miss the fact that the call also does a return. (This is close to what I suggested in the "Returning varying numbers of results from a tail call" thread of 22-Feb-05, but on reflection I think it would be better not to introduce another "dot-keyword.") -- Bob Rogers http://rgrjr.dyndns.org/