cond. op. on ='s LHS
John D. Mitchell
johnm at cory.Berkeley.EDU
Fri Feb 15 19:22:00 AEST 1991
In article <16782 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com (Christopher R Volpe) writes:
>In article <11129 at pasteur.Berkeley.EDU>, johnm at cory.Berkeley.EDU (John
>D. Mitchell) writes:
>|>In article <16754 at crdgw1.crd.ge.com> volpe at camelback.crd.ge.com
>(Christopher R Volpe) writes:
>|>[....]
>|>>Yes, it's ugly, but it's conceivable that someone might have a good
>|>>reason for defining a macro to do this, so that the macro may be used
>|>>in an expression context.
>|>
>|>Aahhh! But context *is* everything.
>Huh??? So, like, what's your point?
Context: the parts just before and after a word or passage, that
determines its meaning. (Webster's New World)
In other words, the original poster gave a code snippet without any
supporting context. That leaves the meaning up to the reader. I for
one assumed that he was talking about using it in 'normal' code (macros
being *not* normal :-).
>|>One reason to use macros is to hide this sort of cryptic code behind
>|>a nice facade. Oh well... if only C had... :-)
>Isn't that what I suggested? Again, I'm unclear as to what you're trying
>to say. Are you agreeing? Disagreeing? And what is it that you wish C had?
Yep, I agree that due to whatever reasons the C language proper and its
attendant pre-processor make the expression of some kinds of functionality
cryptic, difficult, unreadable, confusing, etc. The ternary operator
was built for its ability to be used inside the macro facility of a weak
pre-processor. My "Oh well..." comment was a facetious attempt to jest
those who always want 'just one more feature'.
Sorry for the wasted net-width,
John D. Mitchell
johnm at cory.Berkeley.EDU
More information about the Comp.lang.c
mailing list