From: | fjh@cs.mu.OZ.AU (Fergus Henderson) |
Newsgroups: | comp.compilers |
Date: | 22 Mar 2002 21:20:42 -0500 |
Organization: | Computer Science, University of Melbourne |
References: | 02-03-120 02-03-127 |
Keywords: | assembler, comment |
Posted-Date: | 22 Mar 2002 21:20:42 EST |
"Randall Hyde" <rhyde@cs.ucr.edu> writes:
>>> since C is really just a very very high level macro assembler.
>
>I totally agree with Alfred. C is a terrible macro assembler simply
>because it's macro facilities are so weak. C (and derivatives) would
>be a much better language if CPP were beefed up considerably (think
>Dylan rather than GCC). However, the current trend is to avoid using
>macros entirely in HLLs because of "semantic issues" (i.e., macros
>don't behave like functions) that tend to confuse weaker programmers.
I think part of the problem is that debugger support for C macros in
most existing systems varies from weak to non-existent.
A really good debugger would allow the "step" command to step through
macro expansion.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
[Seems to me that inline functions are better than macros for executable
stuff. With inlines available, I'd only use macros for declarations. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.