Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!sane From: sane@cs.uiuc.edu (Aamod Sane) Newsgroups: comp.lang.misc Subject: Re: improve world by dropping languages with ; Message-ID: <1991Feb23.233234.3480@m.cs.uiuc.edu> Date: 23 Feb 91 23:32:34 GMT References: <21900005@inmet> <21733@yunexus.YorkU.CA> <1991Feb22.211643.12151@linus.mitre.org> <1991Feb23.013443.15843@ico.isc.com> Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager)) Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL Lines: 43 rcd@ico.isc.com (Dick Dunn) writes: >john@mingus.mitre.org (John D. Burger) writes: >> How can anyone stand to program in a language where whitespace matters >> in this way? Why should the status of my code depend on whitespace? >Probably people don't mind programming in a language where whitespace >matters because they also write in natural languages where whitespace >matters. >In fact, one relatively common form of bug in languages where whitespace >doesn't matter is where the layout of the program doesn't reflect the >syntactic structure. Human readers miss the bug precisely because they >*do* care about the whitespace, even more than about the punctuation. >For example, in C: > if (x<0) > fprintf(stderr, "blah blah babble %f\n", x); > exit(1); >Many people will have to look at this several times to figure out why the >program exits here regardless of the value of x, because they see the >whitespace and ignore the punctuation. >I think it would be a step forward to move human and compiler >interpretation of code closer together. >-- This is what the emacs language-specific editing does. I have often been stopped by the editor misalignment to take a good look at what I just wrote. Incidentally, I remember a paper in IEEESoftware I think where someone was making editors directly from the grammar specs. Any news about such things? Did'nt some of the Mac Pascal compilers used to do this? The next step was to be incremental compilation of the language in the background. Aamod Sane -- sane@cs.uiuc.edu == / \ ----- == * \_/ -|||- ==