• 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: Fwd: method confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: method confusion


  • Subject: Re: Fwd: method confusion
  • From: Charles Steinman <email@hidden>
  • Date: Tue, 18 Sep 2007 06:37:09 -0700 (PDT)

--- Hans van der Meer <email@hidden> wrote:

> Renaming the method will be the most convenient I
> guess.
> Then cross my fingers Apple will not introduce that
> one too later on.

In practice, this seems to be pretty unlikely for an
initializer, especially if your name is reasonably
descriptive. I've heard of a few method naming
conflicts being introduced, but I've never heard of it
happening to an initializer. (It may have happened and
they just didn't feel a need to tell me, but I'm just
saying, it doesn't seem to be all that common.)

> Maybe I should resort to the solution of that
> problem given below.
>
> On Sep 17, 2007, Ricky Sharp wrote:
>
> (2) Suffix all ivars with _II (which then gave me
> unique accessors).
> For example:
> BOOL checked_II;
> -(void)setChecked_II:(BOOL)flag;

I don't mean this to insult Ricky, because he knows
what's best for him and his software, but I wouldn't
do this. For most people, I think attaching nonsense
strings left and right will make the code less
readable. I don't think mitigating this minor risk is
worth reducing readability. If Apple does happen to
introduce a conflict for the name (not very likely in
the first place and less likely the more descriptive
your name is), just find-and-replace it.

Anyway, that's my take.

Cheers,
Chuck



____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
_______________________________________________

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: 
 >Fwd: method confusion (From: Hans van der Meer <email@hidden>)

  • Prev by Date: Re: What's the argument aTableView used for?
  • Next by Date: Re: how to get objects of type Class to play with NSCoder?
  • Previous by thread: Fwd: method confusion
  • Next by thread: TextEdit features in my Cocoa app
  • Index(es):
    • Date
    • Thread