Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ames!amdcad!weitek!dms!albaugh From: albaugh@dms.UUCP (Mike Albaugh) Newsgroups: comp.lang.c Subject: Re: Proposal for a scientific look at C style choices Message-ID: <589@dms.UUCP> Date: 6 Jan 89 17:12:03 GMT References: <665@brwa.inmos.co.uk> Organization: Atari Games Inc., Milpitas, CA Lines: 43 From article <665@brwa.inmos.co.uk>, by conor@inmos.co.uk (Conor O'Neill): > In article <1046@ns.UUCP> ddb@ns.UUCP (David Dyer-Bennet) writes: >>I value conservation of vertical space highly, but I don't have the >>rule about braces you propose. I tend to agree with the poster who >>said that braces are necessary only because the compiler isn't smart >>enough to interpret block structure from the indentation. Has anybody >>played with such a compiler, by the way? Or a checker for C which ^^^^^^ I didn't consider it "play" at the time :-) > > The OCCAM language relies entirely on indentation for its block > structure. Each level of indentation MUST be 2 spaces. > (Since OCCAM allows nested functions, etc, any more would push everything > off the right hand side). > I find this very useable, especially when combined with a folding editor, > and it makes it very easy to see the block structure. > -- > Conor O'Neill, Software Group, INMOS Ltd. Alright, that does it ... A hot-head like me should know better than to get involved with such stuff as "style wars", but I just _have_ to respond the the growing "braces are compiler fluff, the _real_ info is in indentation" chorus. I once had the EXTREME displeasure of porting a small snippet of code for which the _only_ reference was a published printout, spread over two pages, of the algorithm in an "ALGOL like" language with the "minor" difference that block structure was _solely_ indicated by indentation (by approximately 2 n-spaces, did I forget to say it was typeset in a proportional face?). Whitespace is one of the very easiest things to subtly screw up when typesetting, copying, or even (gasp) e-mailing. Of course, people whose code is never read by other than themselves, their compiler, or people at their establishment running identical editors (identically configured) on copies of their code won't have any problems :-) Please, please, please, do not remove the very simple and cheap redundancy between braces (or begin ... end ) and indentation. | Mike Albaugh (albaugh@dms.UUCP || {...decwrl!turtlevax!}weitek!dms!albaugh) | Atari Games Corp (Arcade Games, no relation to the makers of the ST) | 675 Sycamore Dr. Milpitas, CA 95035 voice: (408)434-1709 | The opinions expressed are my own (Boy, are they ever)