I’ve been meaning to mention these few things for a while, I think we should switch in QS at some point:
1. Use dispatch_once for singletons. See this
SO for more info. Basically, dispatch_once is thread safe and kinda more obvious what it’s for.
2. For our init and convenience methods, originally the recommended procedure was to use `id` as the return type, but now Clang has
instancetype - something I see Etienne has
already started using ;-)
It makes our code uncompilable for older Clang versions, but I don’t think that’s too much of a problem - I think Henning lost the ability to compile a while ago? :(
Oh, and an NSHipster link because you all like being a hipster ;-)
The main advantage of this I think is that we won’t have to do stupid casting between (QSBasicObject *) and (QSObject *) which we’re having to do in a few places at the moment.
Are there any other code conventions/nuggets that people have picked up recently that we should use in QS