Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.lang.c Subject: Re: Why nested comments not allowed? Message-ID: <646@mwtech.UUCP> Date: 21 Feb 90 14:35:20 GMT References: <236100027@prism> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 26 In article <236100027@prism> ly@prism.TMC.COM writes: > > I'm just curious to know why nested comments are not allowed in many > languages. While other posters showed, that forbidding nested comments is no *disadvantage* because of C-s "#if-#endif" capability, here's a reasons why non-nested comments could be considered to be an advantage: ................... <--- 100 lines of C-Code /* here is some comment */ ................... <--- some statement ................... <--- another 100 lines of C-Code If this source compiles without errors and nested comments *were* allowed, I could never be sure that the compiler had really seen the marked statement after the comment without checking the source before and after it for enclosing comments. The only thing which is still of importance are conditionaly compiled sections, which are far easier to track because in the average programm they appear far less than comments. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83 -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83