Newsgroups: | comp.compilers |
From: | Greg Morrisett <jgmorris@cs.cmu.edu> |
Keywords: | syntax |
Organization: | School of Computer Science, Carnegie Mellon |
References: | 95-04-013 95-04-147 |
Date: | Sat, 29 Apr 1995 18:32:09 GMT |
Charles Fiterman <cef@geodesic.com> wrote:
>... The missing semicolon
>was simply wrong about one fourth of the time. Clearly C would be
>better off with no semicolon and with a rule allowing continued lines.
>Perhaps new line ends a statement except within an open (), or [].
I think the real problem is that we're always trying to boil things
down to a single mechanism for determining delimiters (e.g. newline
vs. semicolon.) The right answer, in my mind, is to require both.
Your study indicates that there really is no overhead for this
(assuming people are already putting semicolons at the end of
statements) and more errors would be caught. At the very least, the
compiler/lint should issue warnings for such lines. A separate
mechanism should be used to indicate that a statement spans multiple
lines.
-Greg Morrisett
jgmorris@cs.cmu.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.