To have some record of the reasons for this design decision, the following
points were raised for/against globally unique plugin names.
For:
1. It may reduce confusion if a plug-in object definition can be interpreted
without knowing about the types of the context in which it is used. For example,
if we write
--search my_search_algorithm(foo=xyzzy(),bar=xyzzy()),
it is nice to know that the two xyzzies refer to the same kind of thing.
(Currently they can be arbitrarily different things if foo and bar have
different types.)
2. It allows us to be closer to Python syntax (or more generally: typical
programming language syntax) than we currently are. For example, rather than the
current
--heuristic h=ff()
--search eager_greedy([h],preferred=[h])
we could write
h=ff()
eager_greedy([h],preferred=[h])
which can be interpreted as straight Python code. This is particularly
interesting because there are many people interested in eventually seeing the
planner embeddable in a library-like way (e.g. into Python).
3. Two different things with the same name may be seen as an anti-feature
because they make it harder to search for something, find out what is going on, etc.
4. We can eventually use the plug-in names directly to enable/disable things in
CMake without requiring further naming conventions (e.g. "PLUGIN_ASTAR", not
"PLUGIN_SEARCH_ASTAR". Without unique names, we'd have to include type
information here.
Against:
5. We will have to use longer names that lead to redundant-looking command-line
syntax in many cases (e.g. "shrink_strategy=shrink_bisimulation(...)").
6. It is easier to step on someone else's toes by "using up" a name in the
global namespace.
If there are further major points, feel free to add them.
|