Operators/adapters are algebras/interpreters from the "object algebra" solution to the expression problem
So I was thinking again about the Kwant 2 "operator interface" that we started working on some time ago.
It seems to me that the fundamental thing we're trying to do is this well known thing called the "Expression problem".
We want to construct "expressions" involving operators and their combinations, and also "evaluators" that interpret the expressions in some way.
building the expressions corresponds to the "Builder" step, and the evaluator is "finalization".
We want to have the freedom to add new kinds of operator (or new ways of combining them), and also to add new ways to evaluate (i.e. get concrete matrices)
We have unknowingly started to use the so-called "object algebra" approach to solving this problem (https://oleksandrmanzyuk.wordpress.com/2014/06/18/from-object-algebras-to-finally-tagless-interpreters-2/)
Perhaps now that we have a name for the problem it will be easier to conceptualize what we want.
disclaimer: I'm not saying I'll work on this right now (I still have lots of work to do towards the vectorization milestone) but if it's written down hopefully it won't be forgotten