• 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: C question for you old guys ;-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C question for you old guys ;-)


  • Subject: Re: C question for you old guys ;-)
  • From: Eric Wang <email@hidden>
  • Date: Wed, 11 Jun 2003 14:51:32 -0400

In conclusion (hopefully),

I think if there's one thing we can all derive from this thread, it's to be
judicious in your use of macros, especially when other people have to read
through your code. My initial reaction to defining "is" to be "==" was that
it was a great way to avoid making assignment errors when instead you meant
to compare. However, after reading some of the well thought-out
counter-arguments against that type of usage, I decided it was probably not
such a good idea if I wanted others to be able to understand my code.

Apologies to those who may find this discussion boring. I found it
especially relevant to my Cocoa work. Just the other day, I was working
through the DragNDropOutlineView example in /Developer/Examples/AppKit. It
was difficult for me to digest because the author uses macros like
NODE_DATA(n) and SAFENODE(n) throughout his code. I only hope Apple can take
the points raised in this discussion into consideration when writing sample
code in the future.

Eric Wang
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: C question for you old guys ;-)
      • From: Roy Lovejoy <email@hidden>
References: 
 >Re: C question for you old guys ;-) (From: Robert Palmer Jr <email@hidden>)

  • Prev by Date: Re: troubling article
  • Next by Date: Errrrm, that breaks <ctype> you know (Re: C question for you old guys ;-))
  • Previous by thread: Re: C question for you old guys ;-)
  • Next by thread: Re: C question for you old guys ;-)
  • Index(es):
    • Date
    • Thread