Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!usc!snorkelwacker!spdcc!esegue!compilers-sender From: henry@zoo.toronto.edu Newsgroups: comp.compilers Subject: Re: Need input on designing a new language Keywords: design Message-ID: <1990Jun4.212434.18527@esegue.segue.boston.ma.us> Date: 4 Jun 90 21:24:34 GMT Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: henry@zoo.toronto.edu Organization: Compilers Central Lines: 46 Approved: compilers@esegue.segue.boston.ma.us In-Reply-To: <1990Jun4.044526.14926@esegue.segue.boston.ma.us> > 4) language support for good software engineering ... >C) allowing arbitrary declaration and use order (use before declaration > is ok) ... > Approach C: ... > 4: poor (How do you get semantic checking across modules? > An optional pass by a lint-like program? Yuck!) Semantic checking across modules is a necessity, and there is only one way to do it: gather information from all the modules, and compare. The question is whether that is done automatically (either by the compiler or by a separate program), or whether the programmer is forced to do some of the work by contorting his program structure to facilitate checking. I take the strange and unpopular :-) position that such mechanical busywork ought to be done by software, not by me. If you insist on seeing it in terms of header files that have to be included for compilation, consider having some part of the implementation generate them automatically, rather than demanding that the user do it. This also avoids the standard problem of header files, to wit that they get out of step with the code they claim to describe. The extra processing time is irrelevant; if minimizing the CPU time needed to compile my programs was all-important, I would write them in hexadecimal. I have no liking for slow compilers, mind you, but if that CPU time is being spent doing something useful -- like performing tasks that would take much longer if done by hand -- I'm all for it. Incidentally, Ray's article is a classical example of what's wrong with header files, since understanding his assessments of the different methods needed constant flipping back and forth between the assessments and his definitions of aspects 1-4 and methods A-C. On a broader topic, I'm in agreement with him that defining a new general-purpose language is likely to be a futile exercise. To gain any popularity at all, a language either has to fill some specialized niche that existing languages address poorly, or be an order of magnitude better than they are at what they already do. Small improvements are not sufficient, because they do not justify the pain of conversion and incompatibility. Henry Spencer at U of Toronto Zoology henry@zoo.toronto.edu uunet!attcan!utzoo!henry -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus}!esegue. Meta-mail to compilers-request@esegue. Please send responses to the author of the message, not the poster.