Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: Sherm Pendley <email@hidden>
- Date: Wed, 11 Jun 2003 20:29:08 -0400
On Wednesday, June 11, 2003, at 07:27 PM, Karl Goiser wrote:
Blue is the colour of the sky
doesn't sound wrong - to me anyway, or am I just screwy?
Screwy you are not! Devious, the dark side of C is. Strong you must be -
temptation you must resist. :-)
Okay, enough kidding. It looked odd to me at first as well. But, the
first time you spend several hours chasing down a bug where you
typed '=' in an 'if' statement where you meant '==', you'll become a
convert.
Anyway, the solution to this debate, as previously mentioned, is for us
all to make sure that we have 'warnings' turned on -Wall (which is easy
to remember!) - and heed them!
That's nice, if you're willing to assume that *any* compiler you *ever*
use can generate that sort of warning for you. I don't think that's a
safe assumption.
On the other paw, an assignment to a constant is, always has been, and
always will be, an error. It's language-neutral, and works just as well
in Perl, Java, JavaScript, or any other language that shares the same
operators as C. It doesn't rely on compiler-specific warnings or
preprocessor tricks.
sherm--
If you listen to a UNIX shell, can you hear the C?
_______________________________________________
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.