• 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: 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.

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

  • Prev by Date: Re: troubling article : a few real argument of my own.
  • 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