• 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: [Q] inconsistent naming for Core Graphics and Foundation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] inconsistent naming for Core Graphics and Foundation?


  • Subject: Re: [Q] inconsistent naming for Core Graphics and Foundation?
  • From: JongAm Park <email@hidden>
  • Date: Sun, 15 Mar 2009 10:46:17 -0700

Thank you for your reply.

So, I understood that the naming convention was changing.

And.. yes.. I know I should accept what Apple makes, but I just was just curious.

Thank you.

On Mar 15, 2009, at 1:21 AM, Ken Thomases wrote:

On Mar 15, 2009, at 2:39 AM, JongAm Park wrote:

On Mar 15, 2009, at 12:04 AM, Andy Lee wrote:

On Mar 15, 2009, at 2:43 AM, JongAm Park wrote:

I'm just curious about the naming convention for Core Graphics and Foundation.
For example, NSMakeRect and CGRectMake are similar but different about where the "Rect" is in its method name.
What is even worse is NSPointInRect and CGRectContainsPoint.
So, if a person is used to the Foundation convention, it is not intuitive to find proper method in Core Graphics.


Is there any reason they are named like that?

I noticed the differences too, and my guess was that it makes it easier to find functions related to CGRects, by searching the API for terms that contain "CGRect". I actually prefer it this way.

Whatever they are, it would be great if there is consistency or if the document mentions those in "related functions or methods." part.

I think the division isn't Core Graphics vs. Foundation (or, more generally, one framework vs. another). I think it's between legacy and new APIs. It seems fairly clear to me that Apple has adopted a convention that new APIs should be centered around a type, and that names within such an API are to start with the name of the type.


However, large portions of Cocoa predate the adoption of this convention, coming as they do from NeXTStep/OpenStep. Those parts aren't going to be just gratuitously renamed to conform to the new convention. That would be massively disruptive.

Unfortunately, there's just no way to generalize "one way to think about all things". You have to accept things as they are and cope with the fact that there isn't just one rule.

Regards,
Ken


_______________________________________________

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: 
 >[Q] inconsistent naming for Core Graphics and Foundation? (From: JongAm Park <email@hidden>)
 >Re: [Q] inconsistent naming for Core Graphics and Foundation? (From: Andy Lee <email@hidden>)
 >Re: [Q] inconsistent naming for Core Graphics and Foundation? (From: JongAm Park <email@hidden>)
 >Re: [Q] inconsistent naming for Core Graphics and Foundation? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: EXC_BAD_ACCESS on NSImageView::setImage
  • Next by Date: Re: How to create an NSDecimal?
  • Previous by thread: Re: [Q] inconsistent naming for Core Graphics and Foundation?
  • Next by thread: Re: [Q] inconsistent naming for Core Graphics and Foundation?
  • Index(es):
    • Date
    • Thread