From: rh@smds.com (Richard Harter)
Newsgroups: alt.folklore.computers,comp.lang.misc
Subject: Re: Indentation
Date: 23 Aug 92 21:56:27 GMT
Reply-To: rh@ishmael.UUCP (Richard Harter)
Organization: Software Maintenance & Development Systems, Inc.

In article <id.Q0KS.MS1@ferranti.com> peter@ferranti.com (Peter da Silva) writes:
>In article <1992Aug18.065110.20337@smds.com> rh@ishmael.UUCP (Richard Harter) writes:
>> One can argue that this freedom of decision is actually undesirable,
>> that a language which eliminates irrelevant decisions is better.

>Certainly. That's the whole point of higher level languages after all.

Too general.  [This sentence no verb.]  One can distinguish between
forcing a choice between essentially equivalent alternatives and the
eliminating the alternatives altogether.  Let me give some examples.

Consider the language FL (short for fascist layout).  In FL all layout
rules are prescribed -- e.g. all scopes are indented to fixed column
positions, the amount of white space between operators and variables
is specified, the location of comments is fixed, etc.  In short the
style guide for FL is part of the language.  Let's suppose there is
a C version of FL, called FLC.  Programs written in FLC have a uniform
style.  Once one has learned FLC one never has to make a layout style
decision again; a class of decisions have been eliminated.  However
FLC programs are just as long as C programs; they have exactly the
same level of abstraction.  As languages FLC and C are at the same
level.

Now consider the language FVN (short for fascist variable names).
In language FVN every variable name must be taken from a data dictionary
that prescribes the attributes of that variable.  E.g., i is an integer
variable that is used as a loop index.  Presumably different programs
can use different data dictionaries [CM nightmare time].  We can
combine C and FVN to get FVNC.  Our FNVC code is run through a pre-
processor which determines all of the variables being used and fills
in the declarations from the data dictionary being used to create
raw C.

Language FVNC eliminates a class of decisions -- what names to use
for which variables.  FVNC programs are more compact than C programs;
all of the declarations have been eliminated.  They have a built in
consistency of nomenclature.  However the level of abstraction remains
the same.

And, of course, there is FLAVNC [Fascist layout and variable names C]
which combines FLC and FVNC.  A programming shop might elect to
use a FLAVNC on the grounds that it enhances productivity and simplifies
maintenance.  One can think of FLAVNC (pronounced flavency) as sort of
a hungarian notation cubed proposition.  FLAVNC definitely eliminates
irrelevant choices; however it really isn't higher level than C.

The debate about the merits of scope controlled by indentation is
a subset of the debate about the merits of C versus FLAVNC.  There
are plusses and minuses on both sides; however we aren't really talking
about higher level versus lower level.

What FLAVNC does is makes decisions for you; what an HLL does is eliminate
even the appearance of the decision.  Thus a 3GL not only the need
for selecting specific index registers; it also eliminates the
reference to them.
-- 
Richard Harter: SMDS Inc.  Net address: rh@smds.com Phone: 508-369-7398 
US Mail: SMDS Inc., PO Box 555, Concord MA 01742.    Fax: 508-369-8272
In the fields of Hell where the grass grows high
Are the graves of dreams allowed to die.
Newsgroups: alt.folklore.computers