As a strawman consider the package java.util
it is a dumping ground for various classes that in most cases do not share anything in common other than the person that put them there was lazy or uninspired to come up with a more semantically correct package name for their class.
As but one example, take the class UUID
what would have been a semantically correct package name for that class?
I am working on implementing my own UUID
class to be more lightweight. I do not want to use me.myproject.util.UUID
for my package name.
I considered me.myproject.rfc4122.UUID
but that does not imply the semantic of the use of UUID
.
I also considered me.myproject.uuid.UUID
but I do not like the tautology in that, even though it is a popular approach in Python to put a class in a module with the same name, and packages
in Java are not semantically equivalent to modules
in Python.
I also considered me.myproject.UUID
but rejected it because I do not want to pollute that part of the namespace with things that are not related. This just moves the problem up a level.
I also considered me.myproject.lib.UUID
but this has no more semantic meaning than .util
and just renames the problem.
semantics
: the branch of linguistics and logic concerned with meaning.
me.myproject.UUID
? Orme.UUID
from me.myproject.uuid import UUID, GetUUIDInfo
looks OK. There could be more than one exported thing in a module.identity
oridentifiers
put your suggestion with a little more explanation as an answer it will probably get accepted.