On Apr 13, 2013, at 6:38 AM, Scott Ribe <scott_r...@elevated-dev.com> wrote:
>> YT wants to create an object, which isn’t as straightforward because you >> can’t have an object literal in Objective-C. Instead you declare a global >> pointer and initialize it early on. > > Oh, right, I work in Objective-C++, so I don't have that limitation, and > always forget about the plain C rules. C++ static initializers are evil, though, at least the ones that run code. They run super early, in an undefined order, with no way to specify dependencies between them; so if you’re not careful they can slow down launch and/or cause weird nondeterministic bugs. (I have spent time on at least one huge C++ project ripping out all static initializer functions/constructors, for exactly those reasons.) —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com