imaginary icon indicating copy to clipboard operation
imaginary copied to clipboard

`_ActionType` creates unnecessarily tight coupling between matching and execution of actions and their implementations

Open exarkun opened this issue 5 years ago • 1 comments

The _ActionType metaclass gives the convenient Action.parse method. However, by hanging this functionality on _ActionType and Action it smashes the action parsing unit together with the action execution unit together with all of the implementations of individual actions.

What is the intended and desirable interface between wiring and action parsing? What is the intended and desirable interface exposed for executing an action? These things are difficult to see when looking at the current implementation and they are not explicitly defined anywhere outside of the implementation.

exarkun avatar Nov 07 '20 15:11 exarkun

This has been on my mind for a couple days in a general way as I re-acquaint myself with the codebase. I've been thinking that the factoring of many of the units related to actions could be improved.

This came up today specifically because of #100 where I am trying to figure out where to put the code that deals with actorInterface being missing from the actor. It's hard to tell which parts of the current implementation should even know about actorInterface.

exarkun avatar Nov 07 '20 15:11 exarkun