Re: The semicolon habit (was: Q: Definition of a scripting lang.)

J.C.Highfield@loughborough.ac.uk
Sun, 30 Apr 1995 12:24:50 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cef@geodesic.com (Charles Fiterman) (1995-04-19)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) ludemann@netcom.com (1995-04-28)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) scooter@mccabe.mccabe.com (1995-04-27)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cg@Myrias.AB.CA (1995-04-27)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) schrod@iti.informatik.th-darmstadt.de (1995-04-28)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) jgmorris@cs.cmu.edu (Greg Morrisett) (1995-04-29)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) J.C.Highfield@loughborough.ac.uk (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) mitchell@mdd.comm.mot.com (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) daveb@perth.DIALix.oz.au (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) anw@maths.nottingham.ac.uk (Dr A. N. Walker) (1995-05-02)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) lwall@netlabs.com (1995-05-09)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) tchannon@black.demon.co.uk (Tim Channon) (1995-05-04)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) ok@cs.rmit.edu.au (1995-05-04)
[11 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: J.C.Highfield@loughborough.ac.uk
Keywords: design, Occam
Organization: Loughborough University, UK.
References: 95-04-013 95-04-186
Date: Sun, 30 Apr 1995 12:24:50 GMT

scooter@mccabe.mccabe.com (Scott Stanchfield) writes:
>>[use indentation rather than { } to show block structure ]
>
>Although I kind of agree, I think we run into _lots_ of trouble when different
>editors use different tab stops, and different people use different tabs
>in their style, and people use "expand" with a different tabstop than they
>should.


Occam uses two spaces as a unit of indentation, and uses the
indentation to show the block structure. This gets around the
problem of differing tab sizes.


Using indentation instead of block start and finish markers
seems to cut down the amount of incorrectly structured program
particularly for novices, but all that indentation can make the
programs very hard to read on a small screen unless you have some
technique of handling the extreme program 'width'. Printing out
the program also suffers these problems.


Occam programming systems usually get around this with folding
editors, where a 'fold' contains code which inherits the indentation
of the fold. When you enter a fold you see the code it contains
starting in column 1. This is works OK for programming. However, I
have never seen a good solution for printing out these programs. You
either print them out as a 'flat' file, where all the folds are
expanded and so the text runs off the right side of the page (or
wraps around) or you use a fancy fold-aware listing program that
prints out the contents of the folds after the code containing them -
equivalent in some ways to printing functions after the code that
calls them but in my experience much harder to read.


I like Occam and folding editors, but I don't think I will be
encouraging the use of significant indentation in major programming
languages until I see a good way of handling the printout problem.


Julian
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.