munck@mitre-bedford.ARPA (05/26/85)
Aha, at last a clear statement of what drives me crazy about C and UNIX. > The man pages are meant as short summaries for human beings ... > The source code is written for dumb computers to interpret. If you read that without a twinge, you're part of the problem. Source code SHOULD BE written for human beings, who are its most frequent and expensive readers, and secondarily for a very specialized, very infrequently-used (in comparison to the total amount of computing done) program called a compiler. Certainly in UNIX, where programs are meant to be read, understood, and changed by many people, the former consideration should weigh much more heavily than the latter. Yet they use C, which has to be mentally translated by the most guru-ie of wizards. In my opinion, the language that best supports writing of superbly human-readable programs at no significant expense in machine efficiency is Ada. I doubt that anyone will challenge that... -- Bob Munck, MITRE
gwyn@Brl.ARPA (VLD/VMB) (05/27/85)
Ada?? You gotta be kidding.. There is NO programming language that can force coders to write good code. Good programming is possible in C and not even as difficult as in many Pascal-based languages. Ditto for bad programming. Sort of like a sports car, isn't it?
thomas@utah-gr.UUCP (Spencer W. Thomas) (05/28/85)
In article <11048@brl-tgr.ARPA> munck@mitre-bedford.ARPA writes: > ... Source >code SHOULD BE written for human beings, who are its most frequent and >expensive readers ... As long as writing readable source code doesn't "prevent" you from ever writing the documentation. One of my friends, whenever he is asked how something works, replies "Read the code!". He rarely writes documentation. As a user of a piece of code, I would rather see well-written *CORRECT* documentation and unreadable code than readable code and NO documentation. -- =Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA) "There are only the pursued, the pursuing, the busy, and the tired." - F. Scott Fitzgerald
kjm@ut-ngp.UUCP (Ken Montgomery) (05/28/85)
>From: munck@mitre-bedford.ARPA > > Aha, at last a clear statement of what drives me crazy about C and >UNIX. > >> The man pages are meant as short summaries for human beings ... >> The source code is written for dumb computers to interpret. > >If you read that without a twinge, you're part of the problem. Source >code SHOULD BE written for human beings, who are its most frequent and >expensive readers, Code should also be written to perform well. CPU cycles are not infinite and not free. > and secondarily for a very specialized, very >infrequently-used (in comparison to the total amount of computing done) >program called a compiler. I would bet that the assertion that compilers are infrequently used is false on machines are used for instructional computing and/or program development. > Certainly in UNIX, where programs are meant >to be read, understood, and changed by many people, the former >consideration should weigh much more heavily than the latter. Yet they >use C, which has to be mentally translated by the most guru-ie of wizards. Translated into what? > > In my opinion, the language that best supports writing of superbly >human-readable programs at no significant expense in machine efficiency >is Ada. Right. Like the ADA program I saw on the net recently which appeared to have two variables called 'x' defined in one procedure (one was an integer and one was floating point). This did not strike me as being a "superbly human-readable program". Does anyone even have a full compiler that produces real code (not interpretive mish-mash), much less one that produces efficient code? > I doubt that anyone will challenge that... Did you forget a :-) ? > -- Bob Munck, MITRE -- The above viewpoints are mine. They are unrelated to those of anyone else, including my cats and my employer. Ken Montgomery "Shredder-of-hapless-smurfs" ...!{ihnp4,allegra,seismo!ut-sally}!ut-ngp!kjm [Usenet, when working] kjm@ut-ngp.ARPA [for Arpanauts only]
abc@brl-sem.ARPA (Brint Cooper ) (05/30/85)
Perhaps the controversy over whom and/or for what source code is written merely illuminates the <true> heresy that "C" is not the ultimate programming language.
ded@aplvax.UUCP (Don E. Davis) (05/30/85)
In article <335@brl-sem.ARPA> abc@brl-sem writes: >Perhaps the controversy over whom and/or for what source code >is written merely illuminates the <true> heresy that "C" is >not the ultimate programming language. No reasonable person would claim that "C" is the "ultimate programming language" because no such thing exists. Every language has its strong points and weak points; every language does some things well and some things poorly. This rabid C programmer is quite willing to admit that the wretched Pascal is better suited for some projects than C. Ditto with Lisp and Forth and <put your favorite language here>. C's strength lies in that fact that it does just about everything reasonably well. It allows the programmer to get right down into the metal like an assembly language while simultaneously soaring aloft on the wings of an HOL. C is the ultimate MULTIPURPOSE programming language. If I were restricted to one and only one language I would pick C without hesitation. And in fact, I choose C for 90% of my programming projects. But I have written in Pascal and Lisp and other languages when the needs of the project dictated that choice. -- Don Davis JHU/APL ...decvax!harpo!seismo!umcp-cs!aplvax!ded ...rlgvax!cvl!umcp-cs!aplvax!ded
arash@jendeh.UUCP (Arash Farmanfarmaian) (05/31/85)
> human-readable programs at no significant expense in machine efficiency > is Ada. I doubt that anyone will challenge that... > -- Bob Munck, MITRE Yes, I will. As long as you are there why not advocate writing system code in Fortran or better even in TPL (for those who are curious TPL is a Pascal based language marketed by Texas Instr.). What you are complaining about is a lack of comments in UNIX C code, an understandable complaint. There is nothing wrong with C. Any language, undocumented, is a pain in the butt to debug. On the other hand I have found that if you know what a program does, even if it is undocumented, it is not too hard to grok the code. Also poring through the code, trying to understand it, will do wonders for your understanding of the system. ADA is not a particularly clear language either. Being able to code new definitions of functions like '+' or '-' can make the code even more misleading and un-understandable than C (unless, again, you know what is going on). So please forgive my stubborness but I'll stick with C. At least I can debug any damn code written in the language. Also, I have discovered that you can trust a C compiler to compile your code. ADA compilers (the couple that exist), tend to be too restrictive. When a compiler only implements half the specifications of a given language, neither the compiler nor the language (which happens to be too complex) is worth anything. I'd rather know what I am allowed to do. If you like ADA so much take a look at IBM software. They should please you. You never know what you can get them to accept either. When you have had to deal with three different compilers for the same language, each with it's own idiosyncresies, all on the same machine you'll know what I mean. And understand my love for 'C.' Arash Farmanfarmaian'85 -- Arash Farmanfarmaian ...!allegra!princeton!jendeh!arash "Any man who lives within his means suffers from a lack of imagination"
billp@ISM780.UUCP (05/31/85)
/* Written 10:59 pm May 29, 1985 by abc@brl-sem in ISM780:net.unix */ Perhaps the controversy over whom and/or for what source code is written merely illuminates the <true> heresy that "C" is not the ultimate programming language. /* End of text from ISM780:net.unix */ I don't think that many people will argue that "C" is the ultimate programming language, and you can ignore the few that do. I would hope that only salespeople actually propose that any language is the ultimate tool. Software engineers and artisans realize that any language they chose will have short-comings and problems. Some of us feel that "C" is a darnsight better than most other choices. With regard to the real issue, it is also clear that machines don't read source code, humans do. Machines are best feed a raw binary stream to load in their program store. Unfortunately, most people can't program in binary any more. Bill Putnam UUCP: ucbvax!ucla-cs!ism780!billp (`: If I wanted your opinion, I'd have beat it out of you :')