Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!quanta.eng.ohio-state.edu!raksha.eng.ohio-state.edu!rob From: rob@raksha.eng.ohio-state.edu (Rob Carriere) Newsgroups: comp.lang.c Subject: Re: C preprocessing Message-ID: <5857@quanta.eng.ohio-state.edu> Date: 24 Sep 90 18:35:34 GMT References: <59770@iuvax.cs.indiana.edu> <223@srchtec.UUCP> Sender: news@quanta.eng.ohio-state.edu Reply-To: rob@raksha.eng.ohio-state.edu (Rob Carriere) Organization: The Ohio State University Dept of Electrical Engineering Lines: 26 Nntp-Posting-Host: raksha In article <223@srchtec.UUCP> johnb@srchtec.UUCP (John T. Baldwin) writes: >#1 Why does the program have to be processed as a one-dimensional string > of tokens? > >It doesn't. > >At least, programs in general do not have to be processed this >way. Your C programs are, because the language has been defined that way. >The reason why language designers like to do this is because it makes it >easier to write the compiler (i.e. the lexer and parser are easier). There is at least one other reason. Many people (especially those who have been exposed to FORTRAN) consider formatted languages to be A Bad Thing. The reason being that my idea of legible formatting need not coincide with the language designer's. In a free-form language like C or Pascal, this doesn't matter, I can format the program any way I want. Similarly, if you have to maintain my code and you don't like my formatting, a beautifying tool will take care of the problem. With a 2-D language, we would all have to use Big Brothers Approved Format. Of course, a lint (or a linting option on a compiler) that takes formatting into account is a different matter altogether. I have nothing against warnings, as long as they follow Heuer's Law. SR ---