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

stidev@gate.net (Solution Technology)
Fri, 12 May 1995 11:09:21 GMT

          From comp.compilers

Related articles
[15 earlier articles]
Re: The semicolon habit (was: Q: Definition of a scripting lang.) ok@cs.rmit.edu.au (1995-05-04)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-10)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-10)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) monnier@di.epfl.ch (Stefan Monnier) (1995-05-11)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cef@geodesic.com (Charles Fiterman) (1995-05-11)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) plong@perf.com (1995-05-11)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) stidev@gate.net (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) rabin@CS.YALE.EDU (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) plong@perf.com (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-15)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-15)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) Charles.Fiterman@bluebird.uchicago.edu (1995-05-28)
| List of all articles for this month |
Newsgroups: comp.compilers
From: stidev@gate.net (Solution Technology)
Keywords: syntax, design
Organization: Compilers Central
References: 95-04-013 95-05-011
Date: Fri, 12 May 1995 11:09:21 GMT

J.C.Highfield@loughborough.ac.uk wrote:


: 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 found style of programming can affect the amount of indentation.
I actually try to limit the amount of nesting so that I don't indent
across the page. If it is getting that deep maybe there should be
another class to handle the details. I also use what I call chained ifs.
that correspond to "case/switch" statements.
if ...
statements
else if ...
statements
else if ...
statements
else
statements


This minimizes the amount of indentation by considering it as one control
structure.


Ken Walter
--


Post a followup to this message

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