For the More Curious: Class Names
In simple applications like RandomPossessions, we only use a handful of classes. However, as applications grow larger and more complex, the number of classes grows. At some point, you will run into a situation where you have two classes that could easily be named the same thing. This is bad news. If two classes have the same name, it is impossible for your program to figure out which one it should use. This is known as a namespace collision.
Other languages solve this problem by declaring classes inside a namespace. You can think of a namespace as a group, to which classes belong. To use a class in these languages, you have to specify both the class name and the namespace.
Objective-C has no notion of namespaces. ...
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