• 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: Raymond Fischer <email@hidden>
  • Date: Wed, 11 Jun 2003 17:17:37 -0700

On Wednesday, June 11, 2003, at 08:48 AM, Andy Lee wrote:
At 11:43 AM -0700 6/9/03, John C. Randolph wrote:
When I write

#define is ==
#define and &&
#define or ||
#define until(a) while(!(a))

Out of curiosity -- do you also use...

#define not !

Regardless of the merits of using the macros, people really should know that
'and', 'or', 'not' are already defined just as indicated above, along with a few
others as well. The use of macros isn't needed for a conforming compiler.

And since not_eq and or_eq are also defined, it would be more consistent to
#define eq ==

And, for the opinion: Such macros don't protect variable names. That introduces
the possibility of errors. In fact it requires that everybody working on a project
know about all such macros so as to avoid using them as variable names. Not good.

----
Ray Fischer
Adobe Systems
_______________________________________________
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.

References: 
 >Re: C question for you old guys ;-) (From: Andy Lee <email@hidden>)

  • Prev by Date: Getting subviews to restore on NSSplitView collapse/uncollapse
  • Next by Date: 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