[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: So, what the heck is a continuation anyway?
At 03:36 PM 12/10/2001 -0600, Paul Prescod wrote:
>Dan Sugalski wrote:
> >
> >...
> >
> > Perl's stack is pretty much independent of the C/system stack, so that's
> > not a problem. We have other problems to compensate, of course. :)
>
>I wonder if that is always true. ;)
"It's not a problem, it's a learning experience" ;-)
>Consider: Perl code calls into Expat or Tk.
>Expat or Tk of course uses the C stack.
>Expat or Tk calls back into Perl.
>
>Now, how do you build a continuation that takes into account the *C
>stack* being used by Expat or Tk?
You don't. Or, rather, I don't. You've unfortunately put forth a rather
tricky problem--"How do you make a complex piece of software do very tricky
and underhanded things without that software's consent?" I don't think it's
entirely possible, so we punt and do the best we can. (And if you think
it's fun with Tk, try it with Oracle. You can probably imagine the pain
from there) It's the same sort of issues as you get with threads. Some
libraries may just not be continuation safe the way some aren't thread-safe.
This would probably be the place to do some gale-force handwaving in the
"worse is better" paper direction. ;-P
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
dan@sidhe.org have teddy bears and even
teddy bears get drunk