I'd rephrase part of the discussion a little bit: we want to discuss whether we want different namespaces or not; we haven't decided yet if we want this. The reason we don't currently have them isn't really that we didn't want to implement them but that we don't know if we want them.
The balance of the discussion shifts a little bit with the Python interface and the idea that different Fast Downward components could be contributed by different libraries. For example, in that context it might make sense to have a "one namespace per library" rule.
This then prompts the question if some parts of the current Fast Downward code should logically be libraries separated from the core, which then interacts with the discussion recently opened by Clemens about having deeper nesting of namespaces. If we want multiple-levels deep nesting, perhaps this is one indication that something wants to be its own library.
I think in a Python-style library you would want separation into multiple namespaces because it makes things less cluttered, less likely to collide if you use code from different people, and you always have the option of "from xxx import *" if that's what you want.
For the command line however, as we discussed, you probably don't want to use dotted names everywhere, and I think this is currently the strongest argument against this. Perhaps a simple answer to this is for the command-line version of Fast Downward to do the equivalent of "from xxx import *" for some modules by default.
On the balance, now that I've assembled my thoughts a bit more, I think I would indeed prefer to have (the option of) separate namespaces, one of which could be "core" (or some such), and that the namespaces should *not* be grouped by category type (like we discussed later), as in one namespace for all evaluators, one for all merge scoring functions etc., but that the grouping should be by which larger "package" we associate the code with. For example, we could have one "merge_and_shrink" package with all our current stuff, which would provide one evaluator, multiple scoring functions, etc. This seems to be an almost unavoidable direction to go if in the long term we want to properly support the model of people contributing their own components independently as libraries.
|