• 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: Stupid block syntax!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stupid block syntax!


  • Subject: Re: Stupid block syntax!
  • From: Sean McBride <email@hidden>
  • Date: Wed, 04 Jul 2012 16:45:59 -0400
  • Organization: Rogue Research Inc.

On Wed, 4 Jul 2012 01:12:12 -0500, Ken Thomases said:

>Right, but the elements of the enum are not of type NSComparisonResult.
>In traditional C, there's no way to declare the type of elements of an
>enum.  There's a coming extension to the language in clang that
>addresses this.  <http://clang.llvm.org/docs/
>LanguageExtensions.html#objc_fixed_enum>  I don't know what version of
>Xcode includes or will include this.  Even when it arrives in the
>compiler, the SDK will have to be updated to take advantage of it.

The SDK will indeed have to change... In Objective-C++11 this is problematic because NSComparisonResult and NSInteger are now different enough that, for example, NSArray's declaration of:

- (NSArray *)sortedArrayUsingFunction:(NSInteger (*)(id, id, void *))comparator context:(void *)context;

is quite wrong to use NSInteger when it means NSComparisonResult.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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


References: 
 >Stupid block syntax! (From: Graham Cox <email@hidden>)
 >Re: Stupid block syntax! (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Adding Properties to NKIssue?
  • Next by Date: Re: Adding Properties to NKIssue?
  • Previous by thread: Re: Stupid block syntax!
  • Next by thread: Re: Stupid block syntax!
  • Index(es):
    • Date
    • Thread