dispatch in the double-dispatch pattern. deferred class SURFACE feature {NONE} -- Initialization make -- Initialize Current. do drawing_agent := agent draw end feature -- Access drawing_agent: PROCEDURE [ANY, TUPLE [STRING, STRING]] -- Drawing agent of Current. feature {NONE} -- Implementation draw (a_data_agent: FUNCTION [ANY, TUPLE, TUPLE [name, color: STRING]]) -- Draw `a_shape' on Current. local l_result: TUPLE [name, color: STRING] do l_result := a_data_agent (Void) print ("draw a " + l_result.color + " " + l_result.name + " on " + type + "%N") end type: STRING -- Type name of Current. deferred end end The agent argument in line #19 and call in line #24 are both polymorphic and decoupled. The agent is decoupled because the {SURFACE}.draw feature has no idea what class `a_data_agent' is based on. There is no way to tell what class the operation agent was derived from, so it does not have to come from SHAPE or one of its descendants. This is a distinct advantage of Eiffel agents over the single inheritance, dynamic and polymorphic binding of other languages. The agent is dynamically polymorphic at run-time because the object is created in the moment it is needed, dynamically, where the version of the objectified routine is determined at that time. The only strongly bound knowledge is of the Result type of the agent signature—that is—a named TUPLE with two elements. However, this specific requirement is based on a demand of the enclosing feature (e.g. line #25 uses the named elements of the TUPLE to fulfill `draw' feature of SURFACE), which is necessary and has not been avoided (and perhaps cannot be). Finally, note how only the `drawing_agent' feature is exported to ANY client! This means that the visitor pattern code (who is the ONLY client of this class) only needs to know about the agent to get its job done (e.g. using the agent as the feature applied to the visited objects). SHAPE The SHAPE class has the basis (e.g. drawing data) for what is drawn, perhaps on a SURFACE, but it does not have to be. Again, the agents provide the indirection and class agnostics required to make the co-variant relationship with SHAPE as decoupled as possible. Additionally, please take note of the fact that SHAPE only provides `drawing_data_agent' as a fully exported feature to any client. Therefore, the only way to interact with SHAPE, other than creation, is through the facilities of