Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: Robert Palmer Jr <email@hidden>
- Date: Wed, 11 Jun 2003 10:50:19 -0400
Hello all,
so as someone who has read most of this thread, but missed some of the
original, I would offer another thought (sorry to keep this going, but
it struck me this morning).
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).
Regarding the comparison between using #defines for renaming numbers
(PI was the example). I would contend that anyone who was well versed
in algebra would EXPECT numbers to be replaced with symbols (or
certainly wouldn't have a problem with it), but replacing OPERATORS
with symbols is NOT a normal thing to do.
I personally think "a is b" or "a plus b" is much harder to read than
"a == b" or "a + b" - for this simple reason: my eye will track to the
operator, but when the operator is replaced with a symbol, there is
nothing for me to queue to.
I hope you'll accept what I fell are pretty objective observations.
Robert Palmer, Jr
email@hidden
_______________________________________________
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.