leichter@yale-com.UUCP (Jerry Leichter) (10/25/83)
Date: Sun, 16 Oct 83 2:12:08 EDT From: Doug Gwyn <decvax!ucbvax!gwyn@BRL-VLD.ARPA> Subject: Re: need info: %r in printf To: decvax!yale-com!leichter@BERKELEY Cc: Unix-Wizards@brl-vgr.ARPA Just for the record, you CAN get a more recent definition of C; just buy the appropriate UNIX System V manuals. You don't need a license. The language is much nicer these days than it was at the time of 7th Edition UNIX. I obtained the DECUS C compiler and was not at all impressed with it. To give the audience an idea of how its developers viewed C, the DECUS compiler was WRITTEN IN MACRO-11! Most of the emphasis in its library support was on ways of accessing the baroque DECisms, especially bad in the RSX-11M version. You would think that "Software Tools" would have had a larger impact.. (I tried sending a copy of this reply directly to Doug Gwyn, but it didn't get through...Doug, I'm afraid you'll have to accept a public response only.) The Unix System V manuals are expensive, quite recent, and hardly widely available. When I say "quite recent", BTW, please bear in mind that DECUS C was written at least 5 years ago, and has changed relatively little: Some things for which hooks were left earlier - like floating point - were added, but there have been no big, structural changes. Hence, the compiler reflects C as it was at about the time of K&R. Also be aware that the compiler, library, and everything else in the distribution were written entirely as "midnight projects" by a small number of people (about 3). (There are a lot of contributors, but the compiler itself is mainly Dave Conroy's, with some additions by Bob Denny and Martin Minow, while the library is mainly Martin Minow's. I have made some small contributions here and there.) None of these people were paid for this work. They also eventually got a bit weary of it. I can well understand why they don't want to bother to keep up with every little of whimsy of Unix's. As to the fact it's written in Macro: Just what would YOU have written the FIRST C compiler in? Remember, there is NO existing C compiler to use: You can't use Unix because a) you have no access to a Unix system; b) you'd have to go through an incredible amount of pain to move stuff to any other system anyway; c) even if you had access, you'd have to be very careful about avoiding license violations. (EVERYTHING in DECUS C is public domain. This is quite deliberate, and is a carefully enforced policy. Nothing makes it into the distribution until we've checked and made sure that the contributer really has the right to distribute the thing publicly, and has given up his own claims.) The eventual goal was to re-do the LIBRARY in C, and if you get the most recent distribution tape - sent to DECUS late this summer - you will find a good part of the library, in C, on it. (In fact, that part moves quite nicely to a 68000.) It's mainly inertia, lack of time, other interests, and a concern for efficiency in SOME of the library routines that keeps them in Macro. (Besides, the first rule programming has GOT to be: If it isn't broken, don't fix it.) As for the compiler: If you want to re-write it in C, you have the blessing of everyone concerned. Bootstrapping is a nice theory, but takes a LOT of work, which would be hard to justify since DECUS C is already portable among the systems it was meant to serve; PCC and other implementations are just fine for "everything else". (I'll address the general Macro vs. C issue below.) Yes, a lot of the library has to do with interfacing to DEC operating systems. That's life. Those operating systems have good sides and bad sides, as does Unix; but the fact of the matter is that a lot of people use them, and with DECUS C around they can now use C with them. If your religious beliefs, lead you to feel that people using DEC OS's somehow don't "deserve" C, you are certainly free to do so; but we will ignore you as a fool. Finally, as to lessons from "Software Tools": Just what lessons is one supposed to learn? Many of the Tools are part of the DECUS C distribution, in entirely new implementations (public domain, remember?). They are written in C, not Macro. That has little if anything to do with what the compiler and library are or ought to be written in. I will say, however, that the reli- gious anti-assembler bias I see all around me is absurd. A well-commented, well-written assembler program - which DECUS C is - is MUCH easier to under- stand, maintain, and change than a poorly commented, poorly written C program. Quality of writing, documentation, and commenting are much more important than source language. A program written in C is not somehow given special divine "understandability" properties. How many people in the world really understand PCC - including Yacc? From the comments I see in unix-wizards, very few. (I have no idea, BTW, whether PCC is poorly written; I do know that most Unix code I've looked at is poorly commented, if commented at all, and the low level of documentation quality for typical Unix programs is all too well known to everyone except "wizards".) -- Jerry decvax!yale-comix!leichter leichter @ yale
dmmartindale@watcgl.UUCP (Dave Martindale) (10/27/83)
Dave Conroy wrote the C compiler which is now DECUS C during several of his work terms between school terms at the University of Waterloo, and worked on it for a while in the job he took after graduation. He liked UNIX (some of it, anyway) and C, but was working under RSX during these periods, thus the compiler had to be written in an available language and the library was oriented towards providing a UNIX-like environment under RSX. If he was good enough to put this effort into the public domain and package it for distribution, when it surely could have been sold for much money, users could at least refrain from bitching about it. It has been said that software is worth what you pay for it. I believe that in this case, this software is worth far more than what you paid. Dave eventually went on to the Mark Williams company and wrote the C compiler which is part of Coherent (a UNIX-like system written from scratch). Of course, he wrote it in C, since he now had his previous compiler available for bootstrapping. Dave Martindale