Related articles |
---|
language design tradeoffs kotula@milli.cs.umn.edu (1992-09-07) |
Re: language design tradeoffs [macro mayhem] markt@harlqn.co.uk (1992-09-24) |
Re: language design tradeoffs [macro mayhem] tgl+@cs.cmu.edu (1992-09-25) |
Re: language design tradeoffs [macro mayhem] andrewd@cs.adelaide.edu.au (1992-09-26) |
Newsgroups: | comp.compilers |
From: | andrewd@cs.adelaide.edu.au (Andrew Dunstan) |
Organization: | The University of Adelaide |
Date: | Sat, 26 Sep 1992 02:01:44 GMT |
Keywords: | C, macros, syntax, comment |
References: | 92-09-048 92-09-171 |
tgl+@cs.cmu.edu (Tom Lane) writes:
|> The real reason that this is such a pain is not macros, it's C's
|> misbegotten syntax. If semicolons were statement separators (a la Pascal)
|> instead of statement terminators, things would work a lot more smoothly.
I can't agree less. The semicolon as statement separator in Pascal can get
to be a real bug sometimes. It also leads to syntactic nonsense. This
compound statement:
begin
x := y;;;;
end
is composed of 5 statements: the assignement plus a null statement after
each semicolon. Let's please have a semicolon terminator and an explicit
null statement as in Ada.
--
# Andrew Dunstan
# Department of Computer Science
# University of Adelaide
# South Australia
# net: andrewd@cs.adelaide.edu.au
[The semicolon as separator (Algol60) vs. as terminator (PL/I) is an old
argument that we're not going to resolve here. My impression is that the
Algol approach is more elegant and makes source transformations, including
macro expansion, easier, while the PL/I approach is easier for humans to
write. Neither is unambiguously better; one's preference usually depends on
what one learned first. Personally, I think that the obvious and intuitive
way to indicate continuations is to put a digit after the initial tab. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.