[comp.lang.misc] emphasising keywords in Algol

steven@cwi.nl (Steven Pemberton) (03/08/90)

In article <451@argus.mrcu> paj@uk.co.gec-mrc (Paul Johnson) writes:
> I would imagine that the emphasise-keyword tradition dates back to
> ALGOL, and (qwerty strikes again) was introduced then because it
> seemed like a good idea.

I doubt that they did it purely because 'it seemed like a good idea'.
My impression is that they thought very hard about every issue that
affected the language.

One advantage of having keywords in another font is that the issue of
which space character to use in identifiers disappears: you use the
space-character itself (which is after all the best choice :-)

Steven Pemberton, CWI, Amsterdam; steven@cwi.nl
"Let us go then you and I/while the night is laid out against the sky/like a
					smear of mustard on an old pork pie"
Nice poem Tom. I have ideas for changes though, why not come over? - Ezra

brian@comp.vuw.ac.nz (Brian Boutel) (03/09/90)

In article <8874@boring.cwi.nl>, steven@cwi.nl (Steven Pemberton) writes:
> In article <451@argus.mrcu> paj@uk.co.gec-mrc (Paul Johnson) writes:
> > I would imagine that the emphasise-keyword tradition dates back to
> > ALGOL, and (qwerty strikes again) was introduced then because it
> > seemed like a good idea.
> [...]

> One advantage of having keywords in another font is that the issue of
> which space character to use in identifiers disappears: you use the
> space-character itself (which is after all the best choice :-)
> 

As I recall, keywords in Algol are basic symbols, not reserved
identifiers, so "begin" is a valid identifier, and it is necessary to
have some way of writing the <delimiter> \{bf begin} which will not look
like an identifier. The Algol-60 report used bold type, which was not
generally available on input devices of the time, hence the various
conventions for distinguishing keywords.


Even with distinguished keywords, the use of space as a space-character
in identifiers is only useful if the language syntax excludes the
possibility of two adjacent identifiers. In functional languages like
ML, Haskell and Miranda, one normally writes "f x", rather than "f(x)",
for function application.

--brian

Internet: brian@comp.vuw.ac.nz
UUCP:   ...!uunet!vuwcomp!brian
Postal: Brian Boutel, Computer Science Dept, Victoria University of Wellington,
        PO Box 600, Wellington, New Zealand
Phone: +64 4 721000
Fax:   +64 4 712070