Thursday, May 1, 2008

Namespaces

We've all encountered name space problems before. Three girls in your English lit class at university are named Julie. Confusion ensues. One Julie comes to be referred to as Julie B., the other is called Julie C., and so on. Streets. If there were no street names, only house numbers, mail delivery would become a crapshoot. Luckily, street names qualify house numbers. Street names are thus name spaces.



Why point this out? I've been reading the ActionScript help entry for Namespaces, which begins: "Namespaces give you control over the visibility of the properties and methods that you create. Think of the public, protected, and internal access control specifiers as built-in namespaces. If these predefined access control specifiers do not suit your needs, you can create your own namespaces..."



I didn't find that a very helpful start when the concept itself had not been explained or related to something concrete.