Design Element
Comment on "Class Variables and Categories"
by Dave — Nov 29
David Young:

Yes, we know about name collisions in categories. I'm not quite sure how you came to the conclusion that we are trying to override methods in categories. On the contrary, I was using it as an reason not to use +initialize.

Sorry, about the comments, you can certainly give feedback in the discussion forum.

Finally, one of the main reasons we are using this technique is for thread safety. Lazy-initialization causes potential thread problems, this should be safe (assuming that you aren't starting up threads in +load, +initialize, or contructors).
Back to "Class Variables and Categories"
Design Element

Copyright © Scott Stevenson 2004-2015