That said, do you have an example of how it would be more flexible to specify a middleware as an object instead of a class? One could conceivably hack this sort of thing by implementing a `new` method on the middleware object that does whatever is needed, though that would probably be confusing to maintain.