Re: The semicolon habit (was: Q: Definition of a scripting lang.)

Greg Morrisett <jgmorris@cs.cmu.edu>
Sat, 29 Apr 1995 18:32:09 GMT

          From comp.compilers

Related articles
[2 earlier articles]
Re: The semicolon habit (was: Q: Definition of a scripting lang.) stidev@gate.net (1995-04-19)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cef@geodesic.com (Charles Fiterman) (1995-04-19)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) ludemann@netcom.com (1995-04-28)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) scooter@mccabe.mccabe.com (1995-04-27)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cg@Myrias.AB.CA (1995-04-27)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) schrod@iti.informatik.th-darmstadt.de (1995-04-28)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) jgmorris@cs.cmu.edu (Greg Morrisett) (1995-04-29)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) J.C.Highfield@loughborough.ac.uk (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) mitchell@mdd.comm.mot.com (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) daveb@perth.DIALix.oz.au (1995-04-30)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) anw@maths.nottingham.ac.uk (Dr A. N. Walker) (1995-05-02)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) lwall@netlabs.com (1995-05-09)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) tchannon@black.demon.co.uk (Tim Channon) (1995-05-04)
[12 later articles]
| List of all articles for this month |

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
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.