January 2020
Intermediate to advanced
532 pages
13h 31m
English
The command, interpreter, and visitor patterns are grouped in this section only because we have already covered their use cases earlier in this book.
The command pattern is used to parameterize actions that are to be performed. In Chapter 9, Miscellaneous Patterns, in the Singleton type dispatch pattern section, we explored a use case where the GUI invokes different commands and reacts to specific actions that the user has requested. By defining singleton types, we can leverage Julia's multiple dispatch mechanism to execute the proper function. We can extend this to new commands by simply adding new functions that take new singleton types.
The interpreter pattern is used to model an abstract ...
Read now
Unlock full access