Path: utzoo!attcan!uunet!munnari.oz.au!uniwa!wacsvax!chris From: chris@wacsvax.OZ (chris mcdonald) Newsgroups: comp.lang.c Subject: Re^2: Why nested comments not allowed? Message-ID: <1523@wacsvax.OZ> Date: 16 Feb 90 05:42:37 GMT References: <236100027@prism> <1414@amethyst.math.arizona.edu> Organization: Comp Sci, Uni. Western Australia. Lines: 28 raw@math.arizona.edu (Rich Walters) writes: >In article <236100027@prism> ly@prism.TMC.COM writes: >> >> I'm just curious to know why nested comments are not allowed in many >> languages. >Nested comments are not supported because it is difficult to tell where the >nesting ends. Have you ever written a paren checker in C? (in any language?) >Reason 2) Why waste the computing power?? After all, it's only a comment!! What a stupid response! I don't know why they are not supported but agree that they are damn useful. They are easy to parse in syntactically correct programs (ever heard of counting?) and, after all, the computer/compiler is supposed to do what we tell it, not for us to bow down and minimize its work. If its really too hard for you to count comments I'll sell you a little parser for a ridiculous amount. -------------------------------------------------------------------------------- Chris McDonald. Department of Computer Science, ACSnet: chris@wacsvax.oz University of Western Australia, ARPA: chris%wacsvax.oz@uunet.uu.net Mounts Bay Road, UUCP: ..!uunet!murtoa!wacsvax!chris Crawley, Western Australia, 6009. SDI: (31.97 +/-10% S, 115.81 +/-10% E) PHONE: ((+61) 09) 380 2533 FAX: ((+61) 09) 382 1688