Regarding additivity discussed in this chapter:
- message-passing allows to add new types without changing already written code
- explicit dispatch allows to add new operations in the same manner
- data-directed approach allows us to add new types with corresponding operations and new operations for existing types as well just by adding new entries in the dispatch table
This is the well-known expression problem.
<< Previous exercise (2.75)
| Index |
Next exercise (2.77) >>