Section 2.4.3 of SICP provides an example of data-directed programing in the context of dispatching on type, but I didn't find a general definition of what it is. Wikipedia article says that it is a programming technique mentioned in SICP and seems to claim that it is the same as polymorphism. I am not convinced however that "data-directed programing" could be a reasonable way to call polymorphism.
The following looks to me intuitively like a reasonable definition of data-directed programming:
extensive use of data structures to direct the control flow of the program.
For example, in Python there is no case
or switch
statement, and one suggested work-around is to use dictionaries. This looks to me like an example of data-directed programming.
Is my understanding correct? If not, what would be the correct general definition? I would like to see any references.