These lines from flense-demo (also appearing in flense-nw) are evidence of a Bad Thing. We're basically forcing consumers to :require the various flense.actions.* namespaces for the "side effect" of evaluating defaction calls that actually define the actions each namespace exports.
defaction itself is kind of a weird API. There's no real reason actions have to be defmethod clauses in what amounts to a global mutable dispatch table, and as far as I can tell the fact that they are is an artifact of some no-longer-relevant reasoning from months ago. Probably every one of these namespaces should just define and export a map from action names to action "specs" and the consumer should just merge these together as desired.
These lines from
flense-demo
(also appearing inflense-nw
) are evidence of a Bad Thing. We're basically forcing consumers to:require
the variousflense.actions.*
namespaces for the "side effect" of evaluatingdefaction
calls that actually define the actions each namespace exports.defaction
itself is kind of a weird API. There's no real reason actions have to bedefmethod
clauses in what amounts to a global mutable dispatch table, and as far as I can tell the fact that they are is an artifact of some no-longer-relevant reasoning from months ago. Probably every one of these namespaces should just define and export a map from action names to action "specs" and the consumer should just merge these together as desired.