
A phrase of the form 'where definition' will be called a
"where-clause." An expression of the form 'expression
where-clause' is a "where-expression." Its two principal
components are called, respectively, its "main clause"
and its "supporting definition." To put 'where' into a
programming language the following questions need
answers.
Linguistic Structure. What structures of expression
can appropriately be qualified by a where-clause, e.g.,
conditional expressions, operand-listings, statements,
declarations, where-expressions?
Likewise, what structures of expression can appro-
priately be written as the right-hand side (rhs) of a
supporting definition? What contexts are appropriate for a
where-expression, e.g., as an arm of a conditional ex-
pression, an operator, the main-clause of a where-ex-
pression, the left-hand side (lhs) of a supporting definition,
the rhs of a supporting definition?
Syntax. Having answered the above questions, what
are the rules for writing the acceptable configurations
unambiguously? E.g., where are brackets optional or
obligatory? or other punctuation? or line breaks? or in-
dentation? Note the separation of decisions about struc-
ture from decisions about syntax. (This is not a denial
that language designers might iterate, like hardware
designers who distinguish levels of hardware design.)
Semantic Constraints on Linguistic Structure. In the
above examples each main clause was a numerical ex-
pression; i.e., given appropriate meanings for the various
identifiers in it, it denoted a number. What other kinds of
meaning are appropriate for a mainclause, e.g., arrays,
functions, structure descriptions, print-formats?
Likewise what kinds of meaning are appropriate for
rhs's of supporting definitions? Notice there is not a third
question analogous to the third question above under
linguistic structure. This is because a where-expression
must mean the same kind of thing as its main clause and
hence raises no new question concerning what contexts
are meaningful. Notice also that the questions about
meaning are almost entirely independent of those about
structure. They depend on classifying expressions in two
ways that run across each other.
Outcome. What is the outcome of the more recondite
structural configurations among those deemed admissible,
e.g. mixed nests of where-expressions, function definitions,
conditional expressions, etc.?
Experimental programming has led the author to think
that there is no configuration, however unpromising it
might seem when judged cold, that will not turn up quite
naturally. Furthermore, some configurations of 'where'
that might first appear to reflect somewhat pedantic dis-
tinctions, in fact provide close matches for current lan-
guage features such as
name/value and own
(see [2, 3]).
All these questions are not answered in this paper. The
techniques for answering them are outlined in Section 4.
One other issue arises when 'where' is added to a
programming language--types and specifications. A
method of expressing these functionally is explained in
[2]. It amounts to using named transfer-functions instead
of class names like integer, i.e., writing
where
n = round(n)
instead of the specification
integer
n
Thus the use of functional notation does not jeopardize
the determination of type from textual evidence.
3. Physical ISWIM and :Logical ISWIM
Like ALGOL 60, ISWIM has no prescribed physical
appearance. ALGOL C0'S designers sought to avoid commit-
ment to any particular sets of characters or type faces.
Accordingly they distinguish between "publication hm-
guage," "reference language" and "hardware languages."
Of these the reference language was the standard and was
used in the report itself whenever pieces of ALGOL 60
occurred. Publication and hardware languages are trans-
literations of the reference language, varying according to
the individual taste, needs and physical constraints on
available type faces and characters.
Such variations are different physical representations
of a single abstraction, whose most faithful physical
representation is the reference language. In describing
IswI~ we distinguish an abstract language called "logical
ISWIM,"
whose texts are made up of "textual elements,"
characterized without commitment to a particular physical
representation. There is a physical representation suitable
for the medium of this report, and used for presenting
each piece of IswI~1 that occurs in this report. So this
physical representation corresponds to "reference ALGOL
60," and is called "reference ISWIM," or the "IswI~i
reference representation," or the "IswI~,r reference hm-
guage."
To avoid imprecision one should never speak just of
"ISWIM,"
but always of "logical IswxM" or of "such-
and-such physical ISWlM." However, in loose speech,
where the precise intention is clear or unimportant, we
refer to "ISWlM" without quMifieation. We aim at a more
formal relation between physical and logical languages
than was the case in the ALGOL C0. This is necessary since
we wish to systematize and mechanize the use of different
physical representations.
4. Four Levels of Abstraction
The "physical~logical" terminology is often used to
distinguish features that are a fortuitous consequence of
physical conditions from features that are in some sense
more essential. This idea is carried further by making a
similar distinction among the "more essential" features.
In fact ISWlM is presented here as a four-level concept
comprising the following:
(1) physical IswlM'S, of which one is the reference
language and others are various publication and hardware
languages (not described here).
158 Communications of the ACM Volt, me 9 / Number 3 / March, 1966
评论