• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ARC and Singletons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC and Singletons


  • Subject: Re: ARC and Singletons
  • From: Karl Goiser <email@hidden>
  • Date: Tue, 02 Aug 2011 12:14:35 +1000

Wow, class methods finally get the tick of approval!  Only 30+ years after being specified in the Smalltalk standard..


Forget about singletons: they are just a workaround for not having class methods/variables.


Each class is a single object that exists for the life of the application therefore it is, by definition a singleton - and you get it for free!


You don’t need to keep and manage variables pointing to the class because you already have it when you send a message to a class method.


Karl

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ARC and Singletons
      • From: Kyle Sluder <email@hidden>
References: 
 >ARC and Singletons (From: Jeff Kelley <email@hidden>)
 >Re: ARC and Singletons (From: Dave Zarzycki <email@hidden>)
 >Re: ARC and Singletons (From: Kyle Sluder <email@hidden>)
 >Re: ARC and Singletons (From: David Duncan <email@hidden>)
 >Re: ARC and Singletons (From: Jeff Kelley <email@hidden>)

  • Prev by Date: Re: Why Don't Cocoa's (Un)Archiving Methods return Errors?
  • Next by Date: Re: ARC and Singletons
  • Previous by thread: Re: ARC and Singletons
  • Next by thread: Re: ARC and Singletons
  • Index(es):
    • Date
    • Thread