Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: David Bishop <email@hidden>
- Date: Wed, 11 Jun 2003 09:26:32 -0600
- Organization: GnuConsulting
>
what does:
>
>
"a is b" mean?
>
>
Seriously if I hadn't been told, this would NOT be obvious. Does this
>
mean "a IS EQUAL to b" (assignment) or "IS a equal to b" (comparison).
>
I don't think using this define makes the code any more readable,
>
especially to an experienced programmer who is USED to reading (a == b)
>
or (a = b) (and YES, I have typo'd that more than once - thank you to
>
compiler writers who are now generating much better errors and
>
warnings).
In context, the meaning is obvious.
if (a is b) { foo; }
while (a is b) {bar;}
What you are pointing out is exactly why some people like replacing == with
is, so that you *don't* mix up "is" from "is equal".
--
"Sorry about the whole 'bomb' thing" - Bruce Rollins
D.A.Bishop
[demime 0.98b removed an attachment of type application/pgp-signature]
_______________________________________________
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.