Custom Namespaces
Namespaces are nothing new to the world of OOP and determine the visibility of definitions, attributes, and methods. The predefined namespaces public, protected, private, and internal are well known, but custom namespaces are rarely used. Thus a custom namespace is the epitome of data hiding, because it's the road less traveled. The lack of familiarity makes it a great way to hide data; and the fact that you can name the definition makes it all the more unlikely that the namespace will be used without being opened specifically.
Using a custom namespace is the equivalent of hiring a bouncer to secure the door of a back-room poker game where only invited guests know the password. The only way an uninvited guest can get through ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access