Actions
This is for John, mainly, but anyone else read on, if you fancy it. Expect me to follow my website motto. This post is a patchwork of thoughts coming from going through actions module, some of those can be damaging or tedious or both.
I had a look at actions, it looks good. Can be cleaned up, but it is better to see what needs to mature further. The api reminds me of one ofthe evaluation models for lambda calculus (don't ask which or what - no clue, I'm bad with those things, if ain't in me bookmarks it ain't in me head).
The primitive, that is php coded actions, are atomic, and defined in some (environment) context. Something like action( $context, $arguments). Conditionals can be defined, for D7, for example. If the conditionals are cond( $context, $pred, $then, $else ). Since we are passing the context explicitly, nothing stops us implementing action closures - not on atomic actions, but on the upper level by adding something like a procedure, or abstraction, or whatever you like to call it, which has very simple 'stack' semantics. abs($context, arguments ) body the arguments get added to context if this form is used. Effectively something like this might happen (the meaning of the following, not how you would write it):