|
|
|
|
|
by hinkley
2105 days ago
|
|
Java was my introduction to namespacing, so I only suspected but didn't know for a long time that Java overdid namespacing. Companies change names, they merge. Sometimes they go out of business but stick around as a foundation stewarding their old projects, and you might be going to example.org for years for documentation on a com.example module. And the namespaces weren't enforced (who is going to stop me from publishing a com.example.foo module?), so it expected much and delivered little. No namespaces is bad. Five level namespaces are better, but still bad for different reasons. Two might be good. Some might prefer three. But zero is right out. |
|
On the other hand I really like how C# and dotnet in general handle the matter. Package namespace are separated from logical (in-code) namespace. Package namespace are usually two/three dotted term, making ownership clear while not bloating the names.