So why did Apple impose an inappropriate language on... Oh never mind, answered that question as soon as I said "Apple". :/
- M On Tue, Nov 28, 2017 at 6:32 PM, Brian Willoughby <[email protected]> wrote: > Hi Mike, > > This AudioUnit issue is basically entirely due to a limitation of Objective > C. There are no namespaces in Objective C. I am a little surprised that ObjC2 > did not add a namespace feature. (*) > > Usually, the namespace collisions do not occur because most Cocoa developers > build all of their code into an application without plugins. The AudioUnit > case is somewhat unique, because ObjC code from many different developers > ends up being loaded into the same application (Logic, Live, etc.) where the > class name conflicts can occur. It's very hard to coordinate names among > different developers, so one solution is to register with Apple for a free > Creator Code and use that four-character string as a prefix to all custom > classes. Since Apple guarantees that Creator Codes will not conflict, that > guarantees the class names won't conflict between developers (if they use > this technique). > > Jeff has a particularly difficult challenge, because his wrapper is intended > to be used by many different developers. Unless the wrapper build environment > requires some sort of developer code, then there's no easy way to segregate > developers. > > By the way, Jeff, you could look into Xcode templates, where you could query > your wrapper users for a unique Manufacturer code that would then be used as > part of the CocoaUI class name. Not sure how much that would help. > > Brian Willoughby > > * In my opinion, the dynamic polymorphism features of ObjC are worth it, even > if they come with this namespace problem. > > > On Nov 28, 2017, at 3:22 PM, Admiral Quality <[email protected]> wrote: >> Have Apple ever explained why there's no namespace feature to avoid >> this nonsense? >> >> And yes, any UUID should do. A suitably long hash of the current time >> is probably a fairly safe bet. >> >> - Mike/AQ >> _______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
