• 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: Strange XCode Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange XCode Warning


  • Subject: Re: Strange XCode Warning
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 15 Sep 2015 11:23:38 -0700


On Sep 15, 2015, at 10:52 AM, Kyle Sluder <email@hidden> wrote:

Class<ProtocolX> really is a Class (instance of metaclass). 

That seems to be true, based on a bit of testing I just did. But I don’t think a type like that makes sense, since it says that the metaclass implements the protocol, which isn’t true; the metaclass would have to implement the “meta-protocol”, and I don’t know if such an entity exists explicitly in Obj-C. (I can’t rely on analogy to Smalltalk-80 because Smalltalk didn’t have protocols.)

For example, if a Class implemented NSCoding that would imply the metaclass had methods like encodeWithCoder:, which isn’t true.

Check out UIAppearance.h; that's how containment-based appearance works.

Hm, I don’t see anything related to metaclasses there, just protocols with class methods.

(To be honest, thinking about metaclasses too much makes my head hurt. There’s a really weird diagram of the class hierarchy in the flyleaf of the classic Smalltalk-80 “blue book” that ends with a strange loop into Object.metaclass. My co-workers and I used to have religious arguments about that diagram when I worked at Xerox.)

Anyway, we’re well into objc-language territory here and should probably stop now that Dave got his compiler warning resolved :)

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Strange XCode Warning
      • From: Kyle Sluder <email@hidden>
References: 
 >Strange XCode Warning (From: Dave <email@hidden>)
 >Re: Strange XCode Warning (From: Jens Alfke <email@hidden>)
 >Re: Strange XCode Warning (From: Dave <email@hidden>)
 >Re: Strange XCode Warning (From: Dave <email@hidden>)
 >Re: Strange XCode Warning (From: Dave <email@hidden>)
 >Re: Strange XCode Warning (From: Jens Alfke <email@hidden>)
 >Re: Strange XCode Warning (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Strange XCode Warning
  • Next by Date: Re: Strange XCode Warning
  • Previous by thread: Re: Strange XCode Warning
  • Next by thread: Re: Strange XCode Warning
  • Index(es):
    • Date
    • Thread