On 27/05/2008, Raymond Hettinger email@example.com wrote:
Conceptually, this is a fine idea, but three things bug me.
First, there is a mismatch between the significance of the problem being addressed versus the weight of the solution.
Second, this seems like the wrong solution to the problem as it places the responsibility in the wrong place and thereby hardwires its notion of what kind of objects should be split.
Again, agreed. The flatten function is one of the canonical examples of the visitor patterns. I see no generalisation of this proposal to other visitor patterns. I'd rather see a solution which addressed the wider visitor use case (I think I just sprained my back bending over backwards to avoid mentioning generic functions :-))
Third, I thought ABCs were introduced as an optional feature [...]
Again, I agree absolutely.