From: temple@ucbeh.san.uc.edu
Newsgroups: comp.sys.mac.apps
Subject: Re: THINK C and C++ (was: C++ and other compilers)
Date: 31 Jul 92 15:43:49 EST
Distribution: usa,world
Organization: Univ. of Cincinnati

In article <1992Jul30.230729.4830@sunb10.cs.uiuc.edu>, pjl@sparc9.cs.uiuc.edu (Paul Lucas) writes:
> In <Jul.30.09.18.31.1992.14015@gandalf.rutgers.edu> rgonzal@gandalf.rutgers.edu (Ralph Gonzalez) writes:
> 
>>jtgorman@cs.arizona.edu (J. Taggart Gorman) writes:
> 
>>>  THINK C does have some OOP in it, but I have heard people call it C+ or
>>>C+-.
> 
>>Think C v.4.0 had minimal object extensions, and was somewhat upward
>>compatible with C++.  Think C v.5.0 adds several additional C++ features,
>>and lets you write code which will compile under C++ without need for
>>conditional compilation.  It still lacks many C++ features, though this
>>may in some cases be an advantage -- I've seen some really impenetrable
> 				      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>C++ code...
>  ^^^^^^^^
> 
> *****>	What...and there aren't impenetrable pieces of C (or Lisp, or
> 	Ada, or Pascal, or...) code?  It's _always_ up to the programmer
> 	as to how comprehensible to make his/her programs; it's got
> 	nothing to do with the given language...nor should it.  It's a
> 	people issue: languages don't make incomprehensible programs,
> 	programmers do.
> 


Not really meaning to interject into this thread, but some languages 
really DO lend themselves to incomprehensibility. BASIC has lost 
favor because it lent itself to poorly structured programs without 
flow -- i.e., "spaghetti programming".  Pascal, on the other hand, 
encourages clarity and structure though things like strong typing, though, of 
course, nothing is ever built so well that someone can't rip it down 
or make a mess of things.  Ordinary C tends to have a more obscure 
syntax than, say Pascal, which makes it more flexible at the cost of 
uniform structure. Moreover, terse and clever procedures tend to be 
popular in the C world; look at any source file for ANSI C functions 
and often you'll see something that looks incredibly efficient, but 
relatively obscure in appearance. In a word, cryptic!
	While you are absolutely correct in asserting that 
programmers are ultimately responsible for the clarity of their 
programs, programming languages are intentionally designed to 
encourage mind sets. When, as in a language like C, where 
programs can be written to be quite efficent thanks to an extremely 
flexible but comparatively cryptic syntax, and to weak typing, where 
anything can be virtually anything, you are practically asking for 
incomprehensible code. (In a C programming class I took once, the 
professor assigned as a first program this: "create the most obscure 
code you can in 5 lines or less."  With C, it was sickeningly easy. I 
would have a harder time doing it with, say, Pascal, though I could 
have probably done that eventualy with enough work :)  ).
	Whether C++ is really as bad as some others is a question I 
can't answer. Personally, plain old C seems less comprehensible than 
C++ in some respects (e.g. syntax for reference parameters).  OOPs is just a 
little different from the kind of programming some of us grew up on.


					Jon Temple