Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!yale!think.com!snorkelwacker!spdcc!esegue!compilers-sender From: mjr@decuac.DEC.COM (Marcus J. Ranum) Newsgroups: comp.compilers Subject: Re: Semicolons (Re: Low-Rent Syntax) Keywords: C, design, debug Message-ID: <3263@decuac.DEC.COM> Date: 25 Aug 90 17:39:25 GMT References: <9008202341.AA06543@llama.ingres.com> <4032@rtifs1.UUCP> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: mjr@decuac.DEC.COM (Marcus J. Ranum) Organization: Digital Equipment Corp., Washington ULTRIX Resource Center Lines: 34 Approved: compilers@esegue.segue.boston.ma.us In article <4032@rtifs1.UUCP>, trt@rti.rti.org (Thomas Truscott) writes: > prog.c: line 13: dubious indentation level. No! No, please! Not indentation in the compiler! :) Next we'd see things like: prog.c: line 666: complicated expression, please comment it > p = malloc(strlen(s)); > ^ > prog.c: line 32: was "strlen(s) + 1" intended? What if 'p' was part of (or going to be part of) some data structure that contained the string size encoded in some other manner ? I can imagine building such capabilities into a pre-processor of some sort, that did idiot checking based on some information about the kind of things you wanted to do, but I don't think it belongs in the compiler (please!). I'm really impressed with the functionality something like Saber-C provides for catching stupid errors like the one above. Somehow, support for catching that kind of thing needs to be built into the development process at code-writing-time, not at compile-time. Do any syntax-directed editors handle such things ? I can imagine a syntax directed editor that understood The One True Brace Style :), had lint built into it, and so on. That way I wouldn't have to use it! mjr. -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.