Re: C question for you old guys ;-)
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.