Newsgroups: | comp.compilers |
From: | "Dr A. N. Walker" <anw@maths.nottingham.ac.uk> |
Keywords: | algol68, design, comment |
Organization: | Maths Dept., Nottingham University, UK. |
References: | 95-04-193 95-05-062 |
Date: | Tue, 16 May 1995 14:00:54 GMT |
our moderator comments:
>[Comment That's a good point, but what about Algol68's extremely overloaded
>punctuation that let you write if a then b else c fi as (a|b|c) ?
>tnemmoC -John]
What about it?
Firstly, allowing you to write "if ... fi" in an alternate form is
surely *under*loading. It allows the user to use "elegant variation" in
styles to make meanings clearer -- you can use, for example, vertically
aligned "if ... fi" for major blocks of code, horizontally aligned
"if ... fi" for key single-line code, and "(...)" for trivia that you
want to slip into place without drawing the reader's attention.
Secondly, the meat of your point [which ISTR you have made before]
is presumably that the *compiler* [and hence the reader] finds it quite
hard to tell whether a left parenthesis is meant to be "(", "[", "if",
"case" or "begin". But it doesn't matter! They are all brackets; and
that in itself is quite an insight for the reader -- one that many more
recent languages have failed to notice [or to exploit].
--
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk
[Agreed, it's not important whether it's hard to compile, but it
seems to me that you could get some hard to find program errors by misplacing
a vertical bar and turning a case into an if or v.v. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.