On Mon, 10 Nov 2003, Dave Whipp wrote: > "Dan Sugalski" <[EMAIL PROTECTED]> wrote > > Right now, the only true difference between a sub call and a return, at > > least at the assembly level, is that we don't pass back a return > > continuation when we're returning > > If one is coding a co-routine/iterator, then perhaps even this difference > might go away?
No, I can't see that happening unfortunately. It'd require the caller to know whether it was calling a coroutine or normal sub. OTOH, you *could* have the PMC for the coroutine be appropriately magic, such that when you fetched it out of the symbol table you didn't get the single shared sub PMC, but rather a custom PMC that had the setup information in it that cached whatever was needed such that repeated invocations had access to previously stored information... Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk