Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pacbell!att-ih!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.misc Subject: Re: Indentation for parsing (was Re: Block Closure (was Re: FOR loops)) Message-ID: <4625@ihlpf.ATT.COM> Date: 3 May 88 23:44:39 GMT References: <918@rlgvax.UUCP> <2400015@otter.hple.hp.com> <11532@shemp.CS.UCLA.EDU> <3925@killer.UUCP> <5992@utcsri.UUCP> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 22 In article <5992@utcsri.UUCP> norvell@utcsri.UUCP (Theodore Stevens Norvell) writes: >The discussion about using indentation to indicate program structure is >interesting to me as I have designed a language which does exactly this >and written a compiler for it. My feeling is that the parser should >read programs (approximately) the same way that people do. In particular >the most important information used by people to understand the control >structure of programs -- namely the indentation structure -- should >not be simply thrown out by the compiler. This kind of stuff is better enforced by language-sensitive editors and pretty-printers, not compilers. I don't mind if there is some lint-type program that gives me warnings if I make an indentation mistake, but I don't want the compiler choking on it. It is a hard job to define what 'readability' is, and I really don't want to slow my compiler down by putting some unnecessary restrictions on indentation. And without language-sensitive editors and/or pretty-printers, it is very hard always getting the indentation right. -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_