[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
> It also depends on how well your language supports closures. Writing
You can get away with it in C because you can cast types to void *,
but since C (and C++) don't have recursive function types, it is
difficult to write CPS style code `in the language' (i.e., making use
of the language features as intended).
> I like to think I already have CPS in my repertoire; I've written a
> it's hard to read and understand. You can't write compound
> expressions, your only control structure is "goto", and the extra
> noise in your source code introduced by defining functions, anonymous
> and otherwise, all over the place makes it still harder to follow.
You can use recursion and constructs other than `goto' (tail-recursive
calls) in CPS.
I don't find the excess noise that distracting in Scheme, but I really
wish there was a truly concise syntax for lambda expressions,
especially if they are to be used for CPS. In other languages (such
as Java), the amount of excess noise is horrendous.