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

RE: A plea for a new old language



On Fri, 2003-05-09 at 10:54, Dan Sugalski wrote:
> The worries are different. The stuff Larry's rolling in is almost 
> entirely optional--if you don't care about curried functions, 
> multimethod dispatch, funky regex syntax, and suchlike things you can 
> ignore it all. Requiring CPS for control transfer at the VM level 
> makes it kinda hard for folks targeting the VM to avoid it, as not 
> actually doing any control transfer sort of limits your options. :)

I think continuations are actually *easier* to understand at the
assembly/bytecode level than they are at the language level (assuming
Scheme semantics).  Anybody who can handle a moderately complicated
calling convention can probably handle "oh, functions take the return
'address' as separate argument, and you can pass it around before
calling it--and the runtime does the Right Thing<tm> with recursive
functions".  This is much easier than understanding tail-call
optimization with varargs, for example.

CPS conversion is a pretty popular topic in good compiler texts, too,
and anybody who's directly targeting a VM probably knows *something*
about compiling.

How much time does it take to explain typical control-flow constructs
and calling conventions using CPS?  I guess this is the important
question.

Cheers,
Eric
(who's not particularly enthused about the way call/cc interacts with
dynamic-wind in Scheme)