Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!think!mit-eddie!genrad!decvax!tektronix!uw-beaver!fluke!kurt From: kurt@fluke.UUCP Newsgroups: net.lang Subject: Re: Discussion on removing punctuation in programming languages Message-ID: <695@dragon.fluke.UUCP> Date: Mon, 13-Oct-86 12:25:16 EDT Article-I.D.: dragon.695 Posted: Mon Oct 13 12:25:16 1986 Date-Received: Tue, 14-Oct-86 07:14:27 EDT Reply-To: kurt@dragon.UUCP (Kurt Guntheroth) Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 46 Reasons for continuing to have delimiters in languages: 1. It makes error recovery easier/possible in the compiler. Don't whine and snivel and say "if the compiler-writers were any good they could do adequate error recovery without noise tokens like delimiters." That simply isn't true. What have you gained if you have a language that is a tiny bit quicker to type in but the compiler can only mark the first syntax error, then gives up? Making error recovery easier for the compiler improves its ability to find all your syntax errors in a single pass. 2. Delimiters reduce the ambiguities in a grammar. This permits the compiler to use more expressive syntactic forms. You can use more powerful forms if they can be separated and made distinct by delimiters. 3. Delimiters reduce the tendency for the compiler to accept incorrect sentences as correctly formed syntax. I recently worked on a compiler that allowed function invocations using a named argument notation. To invoke the function func (arg1, arg2, ... argN) You used the invocation func arg1 , arg2 , ... argN However, since expresions can also be function invocations you could have invocations like func1 arg11 func2 arg21 To make a long story short, comments looked like ! any characters following the "!" up to the end of the line. And if you accidentally forgot the "!", the resulting sentence frequently was accepted as a bizarre function invocation. If the argument list had been delimited by "("...")", or the argument name and argument expression had been separated by ":=", this would have been avoided. Noise words in languages add valuable redundancy that aids the human reader, compiler, and compiler writer. I always think of the words spoken by C.A.R. Hoare in his 1983(?) Turing Lecture address, where he said approximately "Wouldn't it be wonderful if your Fairy Gotmother would wave her magic wand over your program and pronounce it correct, and all you had to do was type it in three times."