visitable
- adjective
- /ˈvɪzɪtəbl/
- Specialized
- Each node in the data structure must be visitable for the visitor pattern to work correctly.
Examples
-
To extend functionality, ensure your objects are visitable by implementing the required interface.
-
The developer made the class visitable so that different operations could be applied without changing its code.
-
The visitable methods allow for flexible design.
-
Is this component visitable in the current architecture?
-
In order to use the Visitor design pattern, each class must be visitable by a visitor object.
-
To ensure modularity in the codebase, it's important that all classes are visitable by implementing the visitor interface.
-
The framework requires that all components are visitable so that custom operations can be performed on them.
Surface Forms
Morphology
Etymology
Visitable keeps the same idea in computing: the root visit means 'to go and see' and -able means 'able to'. It describes a part of a program that can be 'visited' by a piece of code to do work, which is why making something visitable lets different actions be used without changing its original code.