Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!oliveb!Ozona!chase From: chase@Ozona.orc.olivetti.com (David Chase) Newsgroups: comp.lang.misc Subject: Re: Algol-style semicolons Message-ID: <34366@oliveb.olivetti.com> Date: 15 Dec 88 23:47:06 GMT References: <1126@etive.ed.ac.uk> <208100002@s.cs.uiuc.edu> <868@mcrware.UUCP> <8008@aw.sei.cmu.edu> Sender: news@oliveb.olivetti.com Reply-To: chase@Ozona.UUCP (David Chase) Organization: Olivetti Research Center, Menlo Park, CA Lines: 30 In article gary@milo.mcs.clarkson.edu (Gary Levin) writes: >In article <8008@aw.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: >> The best, in my opinion, is to have the semicolon optional: a newline >> will terminate the statement if possible. >Further, I then tried to write this as > > x := (a0+a1+a2 > +a3+a4+a5); > >and I was informed that I was missing a right parenthesis after a2 >(and before the inserted semicolon). Note that Icon would correctly >handle the case of the trailing + as Firth wrote his example. A flaw in Icon's implementation of optional terminators is hardly a condemnation of optional terminators; other parsers have been getting it right for years. I agree rather completely with Mr. Firth's message; I've used a language with optional semicolon syntax, and liked it very much. It is astounding how much the little things often matter. (It's also astounding what horrible parsers some compilers have.) I should add that the trailing operator to indicate continuation rapidly becomes a part of your style when working in such a language. One actually wonders, after reading the keystroke-minimizing arguments on "=/:=" vs "==/=" in Kernighan and Ritchie, why they made semicolons mandatory. BCPL didn't have them. They could have saved one whole character per statement. Enquiring minds want to know. David