#define OR ||

Robert Osborne robert at isgtec.UUCP
Sat Feb 3 06:54:09 AEST 1990


In article <1941 at gmdzi.UUCP> wittig at gmdzi.UUCP (Georg Wittig) writes:
>>Besides, even if you *do* have the ability to run the preprocessor seperately,
>>doing so will destroy lots of potentially-useful information (like #defined
>>error codes, etc.)
>I like *partial* preprocessing :-) What did I say the other day? Let the
>machine do the dirty work ... If you could see the myriads of #define's and
>#ifdef's in my code!
If you need myriads of defines and ifdef's, your not letting the machine do
the dirty work -- writing lots of defines and ifdefs *IS* dirty work!

>>Well, if I want to do that on VMS, first I have to port "awk"...
>I don't understand why you *must* do it in VMS; why don't you copy your
>programs to UNIX?
Nice attitude Georg!   What if one doesn't have UNIX?  If one is writing a
program that must run under VMS copying programs to UNIX isn't much help.

>This is the old slogan: UNIX users always *know* what they do; C users always
>*know* what they do. To my experience, practice and the discussions in
>comp.lang.c prove the contrary. So why not help them to avoid some common
>pitfalls by defining some adequate macros?
You are missing the point entirely Georg,  redefining the language using
macros is one of the biggest pitfalls there is.  From your flippant
responses to the critisims of your method I see you don't care about who has
to maintain your code, or what machine/OS they have to maintain it on.
That's ok but some of us do or have to care!

As an aside,  how many people actually get caught by & vs && or = vs ==?
I know I have been caught a couple of times by =/==, but never by a &/&& or
a |/||.

>To summarize, I see that some of my concrete suggestions were not optimal, but
>I don't depart from the principle that programmers should be supported by
>making some language constructs clearer and by avoiding typical pitfalls of the
>language.
Programmers should avoid typical pitfalls of the language.  Programmers
should also write code that is clear, concise, and maintainable.  Your
macros fail on all three of these counts.
-- 
Robert A. Osborne   {...uunet!mnetor,...utzoo}!lsuc!isgtec!robert 



More information about the Comp.lang.c mailing list