[comp.sys.apple] reply

jperry@UNIX.SRI.COM (John Perry) (05/22/87)

     You are correct (i.e. I forgot) about Leslie Lamport's involvement in
TeX and I should have known better since Leslie used to work at SRI where
I am employed.  And you are also quite correct about LaTeX not being
written in strict Jensen and Wirth Pascal --- but it is so close to Standard
Pascal that it seems to be picking at nits to debate the point.
     However, I do NOT see how my mistakes on the above points have anything
to do with my criticisms posted in my previous memo.  Perhaps you could
enlighten me on that.
     Your reply seems to suggest that I consider Pascal as a superior
software writing language when compared to C and you, therefore, direct
your criticism to that point.  However, I thought my concluding points
made it clear that the languages I considered superior to C were based
on Pascal's principles of clarity and parsimony and I, in fact, mentioned
Modula-2 and Turing as being examples of such.  
     I agree that all languages have "blemishes", as you put it, but I
think that it is the overall clarity of language structure that makes
a language good even in spite of shortcomings in its "dirty details".
C is excellent in "dirty details" --- it has all the tricks near and
dear to the heart of any hacker.  However, its overall design shows
inconsistencies, obfuscations, reliance on the most error-prone
features of programming, and its stauchest supporters (Kernighan
and Ritchie) write books encouraging the use of programming idioms
which save a few characters of typing at the very great expense of
program clarity.  
     That is why I support the addition of good, practical "dirty
details" to languages with a fundamentally sound basic structure.
Modula-2 goes much of the way toward that end. 
      I mentioned several examples of C's shortcomings including inconsistent
rules for structured data types (e.g. can't assign arrays, can assign
records) and interactive I/O (scanf).  You chose to defend the scanf by
saying that the programmer has control over collecting the terminating
newline in a (needless) variable and that this control made it a feature,
not a bug.  I couldn't get the gist of your argument but it was like
suggesting that any bug that the programmer knew about was a feature
 just because he knew about it.
      Then, I was incredulous at your suggestion that strcpy(s,t) is
clearer than the simple assignment  s := t as your defense to my
argument about non-scalar inconsistencies in C.  First, the very name
"strcpy" is a typical, obfuscated hacker abomination.  Second, how
can any procedure call be seen as simpler than an assignment statement?
     Thus, you can guess that I find C less than acceptable both at
the macroscopic and microscopic level.  It's a little like arguing
religion because no one can say, with evidence in hand, that C is
more/less readable/writable than, say, Modula-2.  We only have our
observations and resultant convictions.  
     My conviction is that, despite the limitless overconfidence
programmers have in their own abilities, we should use the simplest,
clearest tools at our disposal.  I find no languages among the
vast choices available which fit this save Pascal and its direct
(Modula-2) and indirect (Turing) successors, not including Ada.



                                          John Perry

gwyn@BRL.ARPA (Doug Gwyn, VLD/VMB) (05/23/87)

C (typed) pointers are not a "dirty trick" but are fundamental for the
programming applications that C was intended for.  One most certainly
can assign structures (not "records") in C, use them as parameters,
etc.  It is true that C arrays are second-class objects, and that if
compatibility with mountains of existing code weren't an issue one
should fix that.  My comments about strcpy() were to counter the claim
you made that the arguments were in a counter-intuitive order, not that
function calls are necessarily superior to direct language support for
a facility.  (Although they might be; it depends.)

There have been many "simple, clear" languages, including Algol 68,
Lisp, TRAC, Bliss, and FP.  Most of these have not been highly
successful in the world of the programming practitioner, not because of
technical problems but because of the many other things that determine
the usability of a programming language.

Even the most ardent defenders of language "elegance" botch their use
of their preferred techniques; there were at least three genuine bugs
in Dijkstra's "A Discipline of Programming" (wherein he was bragging
how he didn't have to run the programs on a computer to know that they
were bug-free).  Recently in Bentley's "Programming Pearls" in CACM,
Don Knuth presented what was supposed to be a textbook example of his
"literate programming" using WEB, and Doug McIlroy had little trouble
tearing it to shreds.

Even the most inhospitable languages can be used with clarity and style,
although certainly some make this easier than others.  I have found it
fairly easy to use C in a reliable manner, but then I spend more time
practicing than complaining.  If you need to learn how to do this, I
would recommend Tom Plum's books.

If C is so terrible, then how do you explain so many commercial software
developers switching to it?  Why aren't they using Turing, if it's really
so much better than C?  I think an honest investigation would show that C
is "good enough" technically for most applications and has other
significant advantages (such as widespread availability) that make it a
better actual choice in most situations.

schung@cory.Berkeley.EDU (Stephen the Greatest) (05/23/87)

	C is near-God in Berkeley, and I have been using it intensively.
	Personally, I think the design of C deserves a Nobel Price for
	Computer Science.  The structure and syntax is so clean, and it
	is reasonably high-level for comfortable programming as well as
	reasonably low-level for real wizard works.  Also, C is almost
	a one-to-one correspondence to assembly language (such as i++
	and i-- for INC and DEC instructions, the use of pointers, arrays
	implemented as pointers, function value returns etc.)  When you
	REALLY sit down and think about the design of C, you will realize
	how beautiful (and how incredibly superior to Pascal and Ada) it
	is.

					- Stephen

ram@nucsrl.UUCP (Renu Raman) (05/24/87)

       If C is near God, then what adjectives would you choose for
       its supersets C++, Concurrent C and of course Concurrent C++?

       I don't have any adjectives left to glorify them.  

       These are three independent languages (in some sense) with
       radically different purposes but elegantly interfaced to
       one another. Compatablity, Portability blah blah (include
       all terms in software engineering here) is here in these.

       I hope these bring death to Ada.
-------------------
Renu Raman				UUCP:...ihnp4!nucsrl!ram
1410 Chicago Ave., #505			ARPA:ram@eecs.nwu.edu
Evanston  IL  60201			AT&T:(312)-869-4276               

PETERSC0@VUENGVAX.BITNET (05/25/87)

> I saw this just a few minutes ago:
> From: EDU%"zen!cory.Berkeley.EDU!schung@cad.Berkeley.EDU"
>    [...]                                                   When you
>    REALLY sit down and think about the design of C, you will realize
>    how beautiful (and how incredibly superior to Pascal and Ada) it
>    is.

    "C"?  Incredibly superior to Pascal and Ada?  I really hate this
age-old argument.  As a matter of fact, I think this is one of the
most pointless, stupid arguments in history.

    If you closely define the reason for using a certain language, then
comparing "C" to Pascal or Ada is ridiculous.  Comparing Pascal or Algol
is more realistic, since Algol is an (almost) direct precursor of Pascal.
And, in the same vein, Pascal is the same way to Ada and Modula.  Even so,
these comparisons are not good ones.  Modula and Ada are successors to
Pascal and have been designed (and often implemented) to do some things
better than Pascal.  For those things, they are obviously more suited
(read: better).  Go ahead and compare "C" to BCPL or "B", but please leave
the Apples and Oranges alone.

    As far as I am concerned, Pascal is easier to work in (for me) because
it is my native language.  "C" is very good for systems work and for other
specialized groups of applications, but it is not the easiest for ME to use.
Nonetheless, I use "C" extensively because it suits my work better a lot
of the time.  I also use COBOL when it is waranted.  I bet the "C" disciples
cringed at that one!  Use whatever is best suited to your application, say I!
If you don't, you're being short-sighted and foolishly loyal to your favourite
language(s).

-Chris

schung@cory.Berkeley.EDU (Stephen the Greatest) (05/25/87)

In article <3510001@nucsrl.UUCP> ram@nucsrl.UUCP (Renu Raman) writes:
>
>       If C is near God, then what adjectives would you choose for
>       its supersets C++, Concurrent C and of course Concurrent C++?

	C is 'near'-God, then I think C++ is 'more near'-God and
	Concurrent C++ is 'extremely near'-God etc. etc. etc. etc......
	...........

>
>       I hope these bring death to Ada.

	Yeah!!!!!!!!!!!!!!!!!!!!


					- Stephen

mcgurrin@MITRE.MITRE.ORG (04/18/89)

Sorry for the general distribution, but I didn't have a valid return address.
~m