Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcso!mike From: mike@hpfcso.HP.COM (Mike McNelly) Newsgroups: comp.lang.c Subject: Re: Why nested comments not allowed? Message-ID: <7060002@hpfcso.HP.COM> Date: 15 Feb 90 16:40:17 GMT References: <236100027@prism> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 29 > I'm just curious to know why nested comments are not allowed in many > languages. 1. They have limited usefulness. For most of the occasions where they are useful, conditional compilation seems to work better. In C, for example, # if condition1 ... # if condition2 ... # endif ... # endif seems to fill the void (pardon the pun) pretty well for me. 2. For those languages with the concept of lines, I find end-of-line comments to be the least bug inducing form. Incorrectly terminated comment blocks, whether in a language that supports comment nesting or not, seem to be a great source of bugs. Note that I am NOT saying that I prefer line oriented languages. I guess it's pretty much a matter of personal preference on the part of the language designers. Mike McNelly mike%hpfcla@hplabs.hp.com