[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continuations




On Sunday, August 10, 2003, at 4:50 PM, Dan Sugalski wrote:
> No, and none, respectively. They allow for some really powerful 
> techniques, and they make some relatively bizarre things easier (like 
> implementing interpreters, compilers, and dynamic syntax extension) 
> but for most of the stuff you'll do with computers they're not 
> particularly useful.

Are exceptions and coroutines sufficient to get those advantages?

The problem I see with continuations is that they don't play nice with 
C. If you exit a C stack, some heap allocations referenced by the stack 
may be released and a second exit from a copy of the stack may contain 
dangling pointers. So AFAICS, continuations only work if you don't call 
back into the VM from C. IMO, that's a severe limitation. I think it's 
worth carefully evaluating whether it's worth it for the target 
applications of your language.

Cheers,
Steve
OSX freeware and shareware: http://www.dekorte.com/downloads.html