4 ms·
i believe this is equivalent to a modern functional effect system, which compiles an AST (typically a hosted monadic sub language, or equivalently a s-expressio
by dustingetz 5y ago
i believe this is equivalent to a modern functional effect system, which compiles an AST (typically a hosted monadic sub language, or equivalently a s-expression with control flow) into a DAG intermediate language. The DAG is abstract and is then further interpreted or compiled into an execution target, which evaluate the DAG with late bound runtime properties like asynchrony, exceptions, side effects, garbage collection, structured concurrency. the key idea is that the DAG is abstract and has no notion of the runtime behaviors like asynchrony; structured programming is about capturing the computation’s essential structure as a DAG and then using that structure to reflect the target runtime behavior. E.g. interpreting edges of the DAG as callbacks. Structure is also about constraints (what you can’t or shouldn’t do) and for example a DAG can’t express goto. But a DAG can express stack frames and lexical closures (by nesting).