-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Objective-C types should have a three letter prefix e.g. OCV #18843
Description
From Apple's documentation on this topic:
Your own classes should use three letter prefixes. These might relate to a combination of your company name and your app name, or even a specific component within your app. As an example, if your company were called Whispering Oak, and you were developing a game called Zebra Surprise, you might choose WZS or WOZ as your class prefix.
The reason for this is that Objective-C has a global namespace, and type names can conflict. Some of the types bundled with the objc module are very simple and prone to conflict like Mat, and Range.
Here is another article on the topic:
I propose using the OCV prefix, and namespacing all of the existing types in the objc module. e.g.
Range->OCVRangeMat->OCVMat
This would be a breaking change, but is necessary to prevent future conflicts with private Apple types, or with other application types.