Article View: comp.lang.misc
Article #6881Re: emphasising keywords in Algol
From: Brian Boutel
Date: Thu, 08 Mar 1990 21:23
Date: Thu, 08 Mar 1990 21:23
34 lines
2135 bytes
2135 bytes
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
Technical Details
Message-ID:
<1990Mar08..12212@kaukau.comp.vuw.ac.nz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!uokmax!munnari.oz.au!kaukau.comp.vuw.ac.nz!brianReferences:
<8874@boring.cwi.nl> <1990Feb20.235034.21698@Neon.Stanford.EDU> <10975@saturn.ADS.COM> <451@argus.mrcu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!uokmax!munnari.oz.au!kaukau.comp.vuw.ac.nz!brian From: brian@comp.vuw.ac.nz (Brian Boutel) Newsgroups: comp.lang.misc Subject: Re: emphasising keywords in Algol Message-ID: <1990Mar08..12212@kaukau.comp.vuw.ac.nz> Date: 8 Mar 90 21:23:12 GMT References: <8874@boring.cwi.nl> <1990Feb20.235034.21698@Neon.Stanford.EDU> <10975@saturn.ADS.COM> <451@argus.mrcu> Sender: news@kaukau.comp.vuw.ac.nz (News Admin) Reply-To: brian@comp.vuw.ac.nz (Brian Boutel) Organization: Dept. of Comp. Sci., Victoria Uni. of Wellington, New Zealand. Lines: 34