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

Re: Y Store /Closures



Sundar Narasimhan writes:
>
> Personally speaking I feel that flows are very poorly characterized
> by textual programs (regardless of the language they are in) that
> can often represent only ONE serial course of action (it shows you
> how dominant the single program-counter paradigm is :). struts 2-d
> designers are a bit better in visualization of web app flows (I
> wonder if "covigo" is still around -- you may want to look them up
> too), but in any complex app, the flow diagrams tend to get fairly
> complex and hard to manipulate. I take it you haven't used such
> tools.

Flow diagrams don't modularize very well -- I think flowcharts were
abandoned for good reasons. I think that the future really lies in
constraint-based approaches, like the Laszlo LZX language that was
demoed at LL2. I thought that was one of the most impressive talks at
the whole workshop.

I could point out that continuations make implementing backtracking
engines for constraint solvers much easier, except that I won't. While
naive engines are easy to write, putting in heavy optimizations is a
lot harder. As a result, I am not sure that even continuations are a
powerful enough abstraction for managing control flow.

Recently I read Hughes' paper _Generalizing Monads to Arrows_, and
have been thinking that it potentially offers a very disciplined
methodology for adding stack inspection primitives to a
language. There are a lot of neat uses for this -- optimizing
backtracking engines, generating genuinely context-sensitive help
messages, better logging, and debugging, to name just a few. This list
looks a lot like the selling points of aspect-oriented programming,
which isn't surprising because AOP has rich stack-inspection
primitives. But this way could potentially let users define AOP advice
in terms of actual object values rather than regexps on method names,
which seems a lot cleaner. Stack inspection, of course, is another way
of saying "reflection on continuations".

-- 
Neel Krishnaswami
neelk@alum.mit.edu