questions from using lint

Craig Wylie craig at comp.lancs.ac.uk
Mon May 19 22:33:41 AEST 1986


In article <456 at hropus.UUCP> ka at hropus.UUCP writes:
>> Yet another convention, not endorsed by any language I know, is to dispense
>> with the braces and let the indentation alone tell the compiler how to
>> interpret the program.  (I came up with this idea after an argument on the
>> "correct" place to put the braces.)
>
>I first encountered this idea about 8 years ago, when Dave Korn used it
>in a specialized language for data checking, and it is a good one.
>
>Using braces to indicated the structure of a program results in code that
>is quite difficult to read.  (Try removing all indentation from any C
>program you choose and see how readable the result is.)  Of course
>sensible programmers use indentation to indicate the structure of the
>program to the reader.  So from the reader's point of view braces are

>Fortunately, grouping by indentation has finally been adopted by at least
>on language.  See the article on "Modcap" in the March issue of Sigplan
>Notices.

It is also the method used in the languages OCCAM and Miranda. The method of
grouping follows something called the offside rule, I will post the
reference (read dig it out of my filling cabinet) if any body mails me for
it.


Craig.

-- 
UUCP:	 ...!seismo!mcvax!ukc!dcl-cs!craig| Post: University of Lancaster,
DARPA:	 craig%lancs.comp at ucl-cs 	  |	  Department of Computing,
JANET:	 craig at uk.ac.lancs.comp		  |	  Bailrigg, Lancaster, UK.
Phone:	 +44 524 65201 Ext. 4146   	  |	  LA1 4YR
Project: Cosmos Distributed Operating Systems Research Group



More information about the Comp.lang.c mailing list