Namespaced values are just globals with a detour. If your Class is in a public namespace, it's a public class.
The only way to truly avoid these problems is a Lua-like system where there are no real globals and everything can be assigned to a name chosen by the user.
Learn something new every day.
- I am a senior software engineer working in industry, teaching and writing on software design, SOLID principles, DDD and TDD.
Location
Buenos Aires
Education
Computer Science Degree at Universidad de Buenos Aires
Namespaced values are just globals with a detour. If your Class is in a public namespace, it's a public class.
The only way to truly avoid these problems is a Lua-like system where there are no real globals and everything can be assigned to a name chosen by the user.
There are a lot of languages supporting scoped Namespaces
Sadly, there's also many languages that Don't. Ruby comes to mind as an example.