Re: C question for you old guys ;-)
Re: C question for you old guys ;-)
- Subject: Re: C question for you old guys ;-)
- From: Jay Vaughan <email@hidden>
- Date: Wed, 11 Jun 2003 17:29:57 +0200
A deep breath, and a count to 10:
READ the code. Don't just stare at it. And for gods sake, please
don't use #define to make changes to language semantics!!!!
For god's sake: try to understand that this addition is not a
*change* to language semantics.
[snip]
If one is worried about changing language semantics, let's start by
not changing the semantics of "semantics."
The word 'semantics' means 'The study of relationships between signs
and symbols and what they represent'.
Unless declared otherwise, standardly as a variable declaration or
with the ever popular cocoa-nutcase "#define is ==" macro, the symbol
'is' means _nothing_ to the compiler.
Making 'is' = '==' when normally 'is' means *nothing* to the
compiler, is, in fact, modifying the compilers/preprocessors
semantics. In this case 'is' isn't a variable, its a new 'compiler
symbol', semantically used where '==' used to be.
Making 'is' mean 'int is;' is not the same sort of semantic shift
(nor is "#define IS 3000"), because from a language/compiler/runtime
perspective an '(int) is' is not the same as an '== is'.
The "#define is ==" addition *is*, therefore, a change to the C
language semantics, and your combined inability to recognize this
only strengthens the case that such habits should not be condoned by
those who ought to know better ...
--
;
Jay Vaughan
r&d>>music:technology:synthesizers - www.access-music.de/
_______________________________________________
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.