Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!spdcc!esegue!compilers-sender From: lins@apple.com (Chuck Lins) Newsgroups: comp.compilers Subject: Re: Semicolons (Re: Low-Rent Syntax) Keywords: parse, design Message-ID: <9009051722.AA29433@internal.apple.com> Date: 5 Sep 90 14:24:18 GMT Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: Chuck Lins Organization: Compilers Central Lines: 27 Approved: compilers@esegue.segue.boston.ma.us >The thing I hate most about Modula-2 is that it won't allow a semicolon on >the last statement of a loop-body, on the dubious grounds that you don't need >one. There is considerable difference between 'not allowed' and 'not required'. Modula-2 does not *require* the semicolon on the last statement of a loop body (or any other place where a statement sequence is allowed). For the reason you mention (maintainability) it's useful to always use the semicolon. I've been doing this for 10 years now. If you compiler won't let you write, WHILE (x > 0) DO DEC(x); (* <-- a semicolon, gentle reader *) END; your compiler is broken. In Modula-2, empty statements may freely occur within a statement sequence. An empty statement consists of just a semicolon since it's merely a separator. -- Chuck Lins (lins@apple.com) Apple Computer, Inc 20525 Mariani Ave MS 37-BD Cupertino, CA 95014 USA -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.