Re^2: Why nested comments not allowed?

bethge at wums.wustl.edu bethge at wums.wustl.edu
Tue Feb 20 07:37:00 AEST 1990


In article <1990Feb19.143619.17663 at uncecs.edu>, utoddl at uncecs.edu
(Todd M. Lewis) writes:
> ... Because we've been doing it that way for eons doesn't mean it's a
> "better way."  Of course, without true nested comments it's the
> only way, but that, too, is beside the point. #ifdef/#endif is better
                                                ^^^^^^^^^^^^^^^^^^^^^^^
> for conditionally compiling code fragments.  Nested comments are the
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> better way to "comment out a section of code that contains comments."
> Your own words--it should be obvious.  I am continually amazed that
> the C community, which claims a plethora of operators is good and that
> professionals should be able to handle them, which can nest {}, [], (),
> and #ifdef/#endif in myriad ways, which declares pointers safe if used by
> responsible programmers, could be intimidated by the concept of something
> as benign, useful, and elegent as nested comments.  Sounds like a lot of
> NIH to me.
>   Sure, nesting of comments can be accomplished with #ifdef/#endif.  So what?
> while and for can be accomplished with goto.  But it's the wrong tool.

This apprears to be a religious issue.  It is not the least bit "obvious" to
me  that "nested comments are the better way" to suppress the compilation of
a section of code.  What is this, if not conditional compilation?

____________________________________________________________________________
Paul H. Bethge                                         bethge at wums.wustl.edu
Biochemistry, Box 8231                                    bethge at wums.bitnet
Washington University
St. Louis, MO 63110                                             314-362-3354



More information about the Comp.lang.c mailing list