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

RE: Continuations

Chris Baker wrote:
> I disagree.  I think people write interpreters all the time; they just
> don't realize they're writing them, so they crank out lame, ad hoc
> interpreters that don't do a whole lot.
> My experience may be atypical (I work on video games), but I can't
> think of too many useful programs that don't, at least, have some
> configuration or document files that they interpret.

This is all true, and is an example of why many programmers might benefit
from learning more explicitly about writing interpreters.  In a sense, all
programs are interpreters of their input.
Writing a poor interpreter without being aware of it doesn't really count.
Besides, interpreters for configuration files are quite some distance from
an interpreter for a language with full continuations, as Alan was talking

Serguei Mourachov wrote:
> But now I have another question about continuations: how useful they
> are for *masses* of developers?
> Does typical programmer need to know about and use continuations?
> What kind of advantages continuations bring into development process?
> Even reading archive of this list I can see that there is some level of
> confusion about continuations.
> What can we expect from "simple" developer if we give him continuations
> as part of "mainstream" language (such as Java, C#, etc)?

The average developer may not need to use continuations directly.  However,
understanding them conceptually could still be useful.  But even if not,
this relates to my earlier post: if mainstream languages are completely
restricted to the lowest common denominator of features that average
developers need, an enormous disservice is done to above-average developers.
Sure, worse is better, and lowest common denominator is to be expected, but
maybe we can sneak a few bits of better in here and there, to make our lives
easier.  Mark them advanced and warn people "do not not try this at home",
if necessary.

One area where continuations may find explicit use in the real world is in
web servers.  If you set hype mode on, the Parrot VM could be the next hot
platform for web applications due to its continuation capability (assuming
continuations will be sufficiently exposed that web frameworks can take
advantage of it).

Re confusion about continuations, much of that exists because people have an
ingrained notion of control flow based on the call/return model, which can
be difficult to let go of.  If developers aren't taught from day one that
all functions always return to their caller, they'll have an improved
understanding of programming in general, and continuations won't seem nearly
as confusing.