Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
- Subject: Re: cocoa-dev digest, Vol 1 #999 - 7 msgs
- From: "John C. Randolph" <email@hidden>
- Date: Fri, 21 Dec 2001 00:08:08 -0800
On Thursday, December 20, 2001, at 11:24 PM, Jeff Koftinoff wrote:
>
On Thursday, December 20, 2001, at 10:17 PM, cocoa-dev-
>
email@hidden wrote:
>
>
> On Thursday, December 20, 2001, at 11:58 am, Jens Bauer wrote:
>
>
>
>> Hi John,
>
>>
>
>>> #define is ==
>
>>> #define or ||
>
>>> #define and &&
>
>>
>
>> Definately a good solution!
>
>
>
> Except for the poor developer who has to maintain your code
>
> latter. If i
>
> had to edit code like that the first thing i would do is
>
> switch everything
>
> back to normal and remove the macros.
>
>
>
> vince
>
>
Unfortunately for you, ANSI C++ defines the very same operator
>
names except for == and = without macros.
How interesting. I never read any of the ANSI C++ drafts
beyond the late '80s.
>
So....
>
>
{
>
bool a,b,c;
>
a and_eq b;
>
a xor_eq c;
>
}
>
>
is completely valid standard code.
I rather like being able to write something like:
if ([window isVisible] and ([self view] is [window contentView]))
;
-jcr
"The right to be heard does not include the right to be taken
seriously." - Hubert Humphrey