In my opinion, the amount of work to add a new operation is more or less the same using Visitor Pattern
or direct modification of each element structure. Also, if I were to add new element class, say Cow
, the Operation interface will be affected and this propagates to all existing class of elements, therefore requiring recompilation of all element classes. So what is the point?