Re: Why don't C comments nest?
- From: Army1987 <army1987@xxxxxxxxx>
- Date: Sat, 14 Jul 2007 11:21:04 +0200
On Fri, 13 Jul 2007 00:33:08 -0700, Al wrote:
Hi all,I don't think that's the reason. I've never written a
(Apologies if this is in a FAQ somewhere, I couldn't find anything).
Almost every time I do any significant amount of coding in C or C++, I
end up wishing C-style comments would nest. It would make rapid
debugging much more convenient (vs. #if 0/#endif or editor macros).
Anyway, was this an explicit design decision, or some sort of historical
artifact? (e.g. too expensive to parse at the time).
preprocessor, but I think that to enable nested comments one would
just need a counting variable incremented for each /* and
decremented for each */, instead of a Boolean variable set and
reset. You might add a translation limit of "32767 nested
comments".
But they wouldn't be that useful. I agree with DTA.
--
Army1987 (Replace "NOSPAM" with "email")
"Never attribute to malice that which can be adequately explained
by stupidity." -- R. J. Hanlon (?)
.
- Follow-Ups:
- Re: Why don't C comments nest?
- From: Harald van Dijk
- Re: Why don't C comments nest?
- References:
- Why don't C comments nest?
- From: Al
- Why don't C comments nest?
- Prev by Date: Re: return the start of a substring in a string in c
- Next by Date: Re: Why don't C comments nest?
- Previous by thread: Re: Why don't C comments nest?
- Next by thread: Re: Why don't C comments nest?
- Index(es):
Relevant Pages
|
Loading