[comp.lang.c] C critisisms

V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) (01/02/88)

From: Stan Horwitz <V4039%TEMPLEVM.BITNET@cunyvm.cuny.edu>
To: Info-C@brl.arpa
In-Reply-To: <Your message of Wed 30 Dec 87 20:21:24 GMT>
Message-ID: <8801020103.aa29401@SMOKE.BRL.ARPA>
Subject: Re: Modern langauges

  Regarding the critisms of C recently posted, as a new C programmer, just
as a hobby ... not work related, I find the whole language very strange
but intriguing.  It does offer the imagitive programmer lots of control
not easily available in higher level languages.  It's syntax is strange
but that can be fixed to some extent by simply creating a file with
#DEFINE statements defining thins in easier terms.  I was tempted to
set up just such a file of definitions with the goal of making the syntax
appear similar to that of Pascal which I know very well, but this is not
something one does when learning a language.  Some of the symbols used
for operations are insane.  If more care were used by C's authors in
selecting symbols to use, it would have made it a little more difficult
to make stupid errors.
   I have one question though.  The whole concept of C is in my opinion
innovative in that the authors have developed a very powerful higher level
assembly language.  It gives all the power of assembly language plus much
more without sacrificing too much in the way of efficiency of object code.
The question is, given the imagination of C's authors why couldn't they
think of a better name to call the language?  Where the heck did the
name come from?  Was the name C the result of a night of heavy drinking
or what?  Not that it really matters, but I am just curious?

   Happy New Year ... Stan Horwitz  V4039 at TEMPLEVM

ugfailau@sunybcs.uucp (Fai Lau) (01/03/88)

In article <11075@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes:
>
>  Regarding the critisms of C recently posted, as a new C programmer, just
>as a hobby ... not work related, I find the whole language very strange
>but intriguing.  It does offer the imagitive programmer lots of control
>not easily available in higher level languages.  It's syntax is strange
>but that can be fixed to some extent by simply creating a file with
>#DEFINE statements defining thins in easier terms.  I was tempted to
>set up just such a file of definitions with the goal of making the syntax
>appear similar to that of Pascal which I know very well, but this is not
>something one does when learning a language.  Some of the symbols used
>for operations are insane.  If more care were used by C's authors in
>selecting symbols to use, it would have made it a little more difficult
>to make stupid errors.

	C was designed for programmers who hate to type (and so
is the whole UN*X system). So some of the names may be strange, if
what you mean is their simplexity. For example, && stands for
.AND. and a+=b is a=a+b, etc.. You see, C was developed to
"get the job done", not as a result of some theories or research
findings (like Lisp and Pascal). Therefore it has little in the
area of defining symbols to be user friendly and easy to interpreate
in the context of a program. It offers the experienced programmers
a lot of power and convenience, but that's about it. Programs written
in this language is not the easiest to understand. Its syntex
isn't the most structured (a+=b == a=a+b, and you can take things
out of the for(..) and put it in the beginning of the loop body, etc.).
And it makes a poor choice as a tool to teach programming concepts.
C nevertheless allows the programmers to bypass all the BS in other
computer languages and just get down to business. It's quick and dirty,
but it works.

>   I have one question though.  The whole concept of C is in my opinion
>innovative in that the authors have developed a very powerful higher level
>assembly language.  It gives all the power of assembly language plus much
>more without sacrificing too much in the way of efficiency of object code.
>The question is, given the imagination of C's authors why couldn't they
>think of a better name to call the language?  Where the heck did the
>name come from?  Was the name C the result of a night of heavy drinking
>or what?  Not that it really matters, but I am just curious?
>
>   Happy New Year ... Stan Horwitz  V4039 at TEMPLEVM

	C stands for Compact, I think, referring to the nature of
the language. Considering the UN*X philophy in naming system
utilities, it is not surpprising that the name has been
consisting of one alphabet. 99% of the Unix utilities are written
in C, and it is correct that C was meant to substitute assembly
language for system programmings.

Fai  Lau
SUNY at Buffalo (The Arctic Wonderland)
UU: ..{rutgers,ames}!sunybcs!ugfailau
BI: ugfailau@sunybcs INT: ugfailau@cs.buffalo.EDU

V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) (01/03/88)

Steve, your answer does seem to be correct.  C is the successor to B which
is the successor to BCVL so thanks for the confirmation.  Others have
provided similiar answers and references to the K and R book.   Stan

V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) (01/03/88)

  Others on INFO-C tell me that C does not stand for compact but it is
simple the next letter after B in the older language BCVL which preceded
the langauge B.  ... Stan

karthur@codas.att.com (Kurt_R_Arthur) (01/04/88)

In article <7597@sunybcs.UUCP> ugfailau@sunybcs.uucp (Fai Lau) writes:
> 
> In article <11075@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes:
>>
>>  Regarding the critisms of C recently posted, as a new C programmer, just
>>as a hobby ... (more stuff)
> 
> 	C was designed for programmers who hate to type (and so
> is the whole UN*X system)...

C and unix were written during the days when teletype machines and other line
terminals (all at 300 baud or less) were the most advanced interaction tools
of the day.   The use of short operators and commands were required if the 
programmer didn't want to spend half his time deleting errant characters.  If
you have ever spent a lot of time with a line editor, you'll understand why.

> C nevertheless allows the programmers to bypass all the BS in other
> computer languages and just get down to business. It's quick and dirty,
> but it works.

OPINION:  Yes, the other BS is bypassed, but by no means does C have to be 
quick and dirty.

>>   I have one question though.  The whole concept of C is in my opinion
>>innovative in that the authors have developed a very powerful higher level
>>assembly language.  It gives all the power of assembly language plus much
>>more without sacrificing too much in the way of efficiency of object code.
>>The question is, given the imagination of C's authors why couldn't they
>>think of a better name to call the language?  Where the heck did the
>>name come from?  Was the name C the result of a night of heavy drinking
>>or what?  Not that it really matters, but I am just curious?
> 
> 	C stands for Compact, I think, referring to the nature of
> the language. Considering the UN*X philophy in naming system
> utilities, it is not surpprising that the name has been
> consisting of one alphabet. 99% of the Unix utilities are written
> in C, and it is correct that C was meant to substitute assembly
> language for system programmings.

C is a derivative of ALGOL/60, via CPL, BCPL, B, and C.  ALGOL/60 was designed
by international committee, but was commonly perceived as too abstract.  CPL
(Combined Programming Language) was an attempt to make ALGOL less general.
CPL did little to enhance ALGOL, but did make it very hard to implement or
learn, so.... BCPL (Basic Combined Programming Language) was written, and 
BCPL eliminates all extraneous constructs to the CPL language.  B was Ken 
Thompson's implementation of BCPL for the DEC machines in use at ATT in the 
late sixties.  B appears to have been a "working name" that never got changed
when the language was finished.  BCPL & B share a common problem, though:
they are so sparse they are almost unusable.  C was Dennis Ritchie's enhancement
of B for DEC machines running under UNIX, named (I guess) in continuation of B.

This does bring up a question though: Why is it C++ instead of D or P? (grin).


Hope this helps!


Kurt Arthur
Software Services of Florida, Inc.

eric@snark.UUCP (Eric S. Raymond) (01/04/88)

In article <7597@sunybcs.UUCP>, ugfailau@joey.UUCP (Fai Lau) writes:
>	C stands for Compact, I think, referring to the nature of
>the language. Considering the UN*X philophy in naming system
>utilities, it is not surpprising that the name has been
>consisting of one alphabet.

Grrr...if you don't know the answer, don't bloody make one up!

The name 'C' was assigned because the original DMR compiler on the PDP-11 was
written as the successor to an interpreted language called 'B' that Ritchie
had been hacking with on the original PDP-7 proto-Unix. B, in turn, was so
called because it was a stripped-to-the-running-gears version of BCPL
(aka British Common Programming Language), a typeless Algol-descended
language developed for systems programming in the mid-60s in England.

-- 
      Eric S. Raymond
      UUCP:  {{seismo,ihnp4,rutgers}!cbmvax,sdcrdcf!burdvax,vu-vlsi}!snark!eric
      Post:  22 South Warren Avenue, Malvern, PA 19355    Phone: (215)-296-5718

dag@chinet.UUCP (Daniel A. Glasser) (01/05/88)

In article <7597@sunybcs.UUCP> ugfailau@joey.UUCP (Fai Lau) writes:
>In article <11075@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes:
[much stuff deleted]
>>The question is, given the imagination of C's authors why couldn't they
>>think of a better name to call the language?  Where the heck did the
>>name come from?  Was the name C the result of a night of heavy drinking
>>or what?  Not that it really matters, but I am just curious?
>>
>>   Happy New Year ... Stan Horwitz  V4039 at TEMPLEVM
>
>	C stands for Compact, I think, referring to the nature of
>the language. Considering the UN*X philophy in naming system
>utilities, it is not surpprising that the name has been
>consisting of one alphabet. 99% of the Unix utilities are written
>in C, and it is correct that C was meant to substitute assembly
>language for system programmings.
>
>Fai  Lau
>SUNY at Buffalo (The Arctic Wonderland)
>UU: ..{rutgers,ames}!sunybcs!ugfailau
>BI: ugfailau@sunybcs INT: ugfailau@cs.buffalo.EDU

No, I believe that the name "C" actually comes from
the language BCPL, on which C's predicessor, B, is based.
Many attempts have been made by authors of C and UNIX texts
to come up with more romantic or meaningful meanings for these
names, but in fact, they are just puns or jokes.

BCPL and B are typeless, ie, only machine word types.  C is not
a sub-dialect of either of these languages.

Just to fill you in, and fill up the pnews line requirement but
not restart the "origin of the name UNIX" flamefest that occurs
every six months ahead of schendule, the name "UNIX" is a pun --
The authors had been working on the MULTICS project.  MULTICS is
the PL/I of operating systems, is huge and does everything in
the OS.  UN (as opposed to MULT) IX (instead of ICS).
[Some authors have attempted to change history here and have
asserted that the name unix was chosen as "a reference to the
unified, team programming environment it would serve." (1)]

I hope this clears some stuff up for both of you.

				Daniel A. Glasser

(1) Rebecca Thomas, PhD & Jean Yates, "A User Guide to the UNIX(TM) System"
	copyright 1982 by McGraw-Hill, ISBN 0-931988-71-3.  Excerpt
	reprinted within the copyright limits and does not violate
	any US or international copyright convention.  It is from Chapter 1
	(Page 6, end of first paragraph in my edition.)
-- 
					Daniel A. Glasser
					...!ihnp4!chinet!dag
					...!ihnp4!mwc!dag
					...!ihnp4!mwc!gorgon!dag
	One of those things that goes "BUMP!!! (ouch!)" in the night.

firth@sei.cmu.edu (Robert Firth) (01/05/88)

In article <1473@codas.att.com> karthur@codas.att.com (Kurt_R_Arthur) writes:

[ amid a lot of accurate and entertaining stuff on the history of C ]

> BCPL & B share a common problem, though:
>they are so sparse they are almost unusable...

Well, I've been a BCPL user and fan for more than 15 years, and by no means
consider it unusable.  Some illustrations

(a) compilers, not just for BCPL but bigger languages, including Algol-60,
    Algol-68, Fortran-77 and Modula-2.

(b) operating systems, including Tripos, one of the best (in my opinion)
    distributed OS (sold commercially as 'Trout')

(c) data bases, including 'Scrapbook' (also a commercial product), and a
    relational DB from the same vendor whose name escapes me.

(d) real-time programs, would you believe, including a distributed kernel
    to support Ada.

Yes, the language is sparse; it has very few primitive semantic concepts.
But it is also very easy to use, and you can build most of the higher-level
stuff you need.  It is also very portable, since there is not a lot to
implement, and the implementor is highly motivated to get it right.

eao@anumb.UUCP (e.a.olson) (01/05/88)

In article <7597@sunybcs.UUCP> ugfailau@joey.UUCP (Fai Lau) writes:
>In article <11075@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes:
>
>	C stands for Compact, I think, referring to the nature of
>the language. Considering the UN*X philophy in naming system
>utilities, it is not surpprising that the name has been
>consisting of one alphabet. 99% of the Unix utilities are written
>in C, and it is correct that C was meant to substitute assembly
>language for system programmings.

	
	Nope. 'C' is called that because it is a successor to 'B'! :-)

firth@sei.cmu.edu (Robert Firth) (01/05/88)

In article <145@snark.UUCP> eric@snark.UUCP (Eric S. Raymond) writes:
  >In article <7597@sunybcs.UUCP>, ugfailau@joey.UUCP (Fai Lau) writes:
  >>	C stands for Compact, I think, referring to the nature of
  >>the language. Considering the UN*X philophy in naming system
  >>utilities, it is not surpprising that the name has been
  >>consisting of one alphabet.
  >
  >Grrr...if you don't know the answer, don't bloody make one up!
>
>The name 'C' was assigned because the original DMR compiler on the PDP-11 was
>written as the successor to an interpreted language called 'B' that Ritchie
>had been hacking with on the original PDP-7 proto-Unix. B, in turn, was so
>called because it was a stripped-to-the-running-gears version of BCPL
>(aka British Common Programming Language), a typeless Algol-descended
>language developed for systems programming in the mid-60s in England.

That's 'Basic Combined Programming Language'; it was the early '60s, and
Martin did most of the work while in the USA.  Moreover, B was not a
'stripped' version; the main change was to replace the readable Algol
like syntax with one more to the author's taste.

Granted, I have the dubious advantage of having lived through this history,
but surely you guys could look it up?

jmh@eagle.ukc.ac.uk (Jim Hague) (01/06/88)

Expires:

Sender:

Followup-To:


In article <145@snark.UUCP> eric@snark.UUCP (Eric S. Raymond) writes,
correcting some misinformation on C ..
>
>Grrr...if you don't know the answer, don't bloody make one up!
>
>.. BCPL (aka British Common Programming Language) ..

BCPL = Basic CPL ( CPL = Combined Programming Language ). This is the gospel
according to R & W-S. Thanks be to thee, O-CODE.

     -------                         |  |
    / o-----    * B A N G *          |__|   * O U C H *
   /_/                           ___/   )
                                (____/I_I
Sprinkle :-) liberally ......
-- 
Jim Hague       UUCP: ..!mcvax!ukc!jmh		Failure has gone to his
		TG:   72:MAG10135		head. - Wilson Mizner.

gwyn@brl-smoke.ARPA (Doug Gwyn ) (01/06/88)

In article <11075@brl-adm.ARPA> V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) writes:
>... I find the whole language very strange ...

What one thinks things "should" be like is heavily influenced by one's
past experience.  You may already realize this, but an amazing number
of people don't -- witness the recurrent "editor wars", "VMS vs. UNIX"
debates, etc.  C doesn't seem that strange to BCPL or experienced C
programmers..  Now, that Pascal, man -- that's a strange language! :-)

>Was the name C the result of a night of heavy drinking or what?

I think they were going to call it "Pussy Galore", but discovered that
Ian Fleming had already appropriated that name.

ugfailau@sunybcs.uucp (Fai Lau) (01/06/88)

In article <6938@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>
>What one thinks things "should" be like is heavily influenced by one's
>past experience.  You may already realize this, but an amazing number
>of people don't -- witness the recurrent "editor wars", "VMS vs. UNIX"
>debates, etc.  C doesn't seem that strange to BCPL or experienced C
>programmers..  Now, that Pascal, man -- that's a strange language! :-)
>
	I have had the opportunity to use both the VNS editor
and the UN*X editor, and I think they're just equally good.
Granted when I first used the vi I was shocked. You mean
I have to type an i to insert and type escape to exit the mode?
But when I got totally used to it I ended up liking it as much
as the VMS editor. What convenience it sacrifies is counter
balanced by the power it offers, so it really isn't better
or worse. To use the corny phrase "it's just different".
Now I use vi most often, and I have been really rusty
in my ability of using the VMS editor (I used to remember
the functions of every single key on the key pad). I can
understand why some people would prefer vi and why some people
would prefer VMS. And I think a "war" is pointless.

Fai  Lau
SUNY at Buffalo (The Arctic Wonderland)
UU: ..{rutgers,ames}!sunybcs!ugfailau
BI: ugfailau@sunybcs INT: ugfailau@joey.cs.buffalo.EDU

jpn@teddy.UUCP (John P. Nelson) (01/08/88)

>This does bring up a question though: Why is it C++ instead of D or P? (grin).

I thought that this pun was obvious:  C++:  the old value of C, and
increment it as well.

peter@sugar.UUCP (Peter da Silva) (01/08/88)

In article <3686@aw.sei.cmu.edu>, firth@sei.cmu.edu (Robert Firth) writes:
> (b) operating systems, including Tripos, one of the best (in my opinion)
>     distributed OS (sold commercially as 'Trout')

I'd have to disagree. Tripos is also sold as the DOS part of AmigaDOS. The
use of BCPL produces innumerable headaches for programs that want to use it:
BCPL pointers are indexes into a 32-bit-wide array based at 0. Thus to send
an address to BCPL you have to divide it by 4 (shift right 2 places) if you
are using ANY other languages. The BCPL orientation of Tripos makes the C
orientation of UNIX look like a mild bias. Tripos is, in design and
implementation, a very nice system (though the file system could do with
a more pragmatic approach to directories). If it was written in anything
but BCPL it'd be great.

Tripos is also available as the O/S on the Sinclair QL, for those who want
to wet their Tripos feet without laying out O($1000) for an Amy.

Of course that's not to say that you shouldn't run right out now and get
an Amiga... :->
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.

halvers@iraq.steinmetz (peter c halverson) (01/08/88)

In article <4559@teddy.UUCP> jpn@teddy.UUCP (John P. Nelson) writes:
>>This does bring up a question though: Why is it C++ instead of D or P? (grin).
>
>I thought that this pun was obvious:  C++:  the old value of C, and
>increment it as well.

But shouldn't it really be ++C then? Otherwise, the value (language?) 
"returned" is still the old C :-)



~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Pete Halverson                       ARPA: halverson@ge-crd.ARPA
General Electric Company             UUCP: uunet!steinmetz!iraq!halvers
Corporate R & D                            
Schenectady, NY

"Trust me; I know what I'm doing."
                                    --- Inspector Sledge Hammer

firth@sei.cmu.edu (Robert Firth) (01/08/88)

In article <3686@aw.sei.cmu.edu>, firth@sei.cmu.edu I wrote

[BCPL has been used for]
   (b) operating systems, including Tripos, one of the best (in my opinion)
     distributed OS (sold commercially as 'Trout')

In article <1378@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:

  I'd have to disagree. Tripos is also sold as the DOS part of AmigaDOS. The
  use of BCPL produces innumerable headaches for programs that want to use it:
  BCPL pointers are indexes into a 32-bit-wide array based at 0. Thus to send
  an address to BCPL you have to divide it by 4 (shift right 2 places) if you
  are using ANY other languages. The BCPL orientation of Tripos makes the C
  orientation of UNIX look like a mild bias...

Thanks, Peter - I was imprecise.  What I meant to say was that I thought
highly of the concepts, design, and implementation of Tripos, having used
it from the terminal and from BCPL code.

However, the Amiga port made a decision I consider totally crazy: to
exposdet to other languages the implementation of the BCPL pointer.  The
proper place for shifts left and right is either at the interface (so the
compiler does it for you) or within the BCPL code.  To force upon the
user those BPTRS or whatever they're called was a major blunder.  Peter
is if anything too kind here.  But I still claim (albeit unconvincingly)
that this is not a defect of BCPL but rather of the way other things
were built on top of it.

And no, I'm not about to run out and buy an Amiga, for all sorts of reasons.

devine@cookie.dec.com (Bob Devine) (01/09/88)

 
>>This does bring up a question though: Why is it C++ instead of D or P? (grin).
 
>I thought that this pun was obvious:  C++:  the old value of C, and
>increment it as well.

 Actually it should be ++C.  C++ means use the current value before 
incrementing.  To be perverse, one could call Stroustrup's creation C++,C.

Bob

peter@sugar.UUCP (Peter da Silva) (01/15/88)

In article ... devine@cookie.dec.com (Bob Devine) writes:
>  Actually it should be ++C.  C++ means use the current value before 
> incrementing.  To be perverse, one could call Stroustrup's creation C++,C.

It's "increment 'C', but return (output) the old value". You have to remember
that it's almost always a preprocessor.
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.

peter@sugar.UUCP (Peter da Silva) (01/15/88)

In article <3737@aw.sei.cmu.edu>, firth@sei.cmu.edu (Robert Firth) writes:
>
> In article <3686@aw.sei.cmu.edu>, firth@sei.cmu.edu I wrote
>
> [BCPL has been used for]
>    (b) operating systems, including Tripos, one of the best (in my opinion)
>      distributed OS (sold commercially as 'Trout')
> 
> In article <1378@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes:
> 
>   [ BCPL pointers (indexes into a 32-bit wide array based at 0) cause lots
>     of problems in Tripos ]
> 
> Thanks, Peter - I was imprecise.  What I meant to say was that I thought
> highly of the concepts, design, and implementation of Tripos, having used
> it from the terminal and from BCPL code.

First I'd like to take this opportunity to totally flame Tripos for their
brain-damaged hashed directories setup, but I'll restrain myself. Secondly:

> However, the Amiga port made a decision I consider totally crazy: to
> exposdet to other languages the implementation of the BCPL pointer.  The
> proper place for shifts left and right is either at the interface (so the
> compiler does it for you) or within the BCPL code.

They put these shifts in the interface code. *however*, there are certain
operations that you can't do through the interface that require you to go
digging into the BCPL data structures. I have had to do this, for example,
to get a list of mounted devices for a file requestor so I could display
them to the user (i.e., Tripos doesn't let you examine your whole name
space through the interface). You also need to do this to add device drivers
to Tripos (dynamically loadable drivers are one of its nice features).
Finally, any programs that want to do things in their CLI structures (testing
or changing their stack size, for example) have to deal with these monsters.

It's not forced on the user, but it's forced on any programmer who wants
to present a nice user-interface to the user, or who wants their code to
run in unusual environments.

> To force upon the
> user those BPTRS or whatever they're called was a major blunder.  Peter
> is if anything too kind here.  But I still claim (albeit unconvincingly)
> that this is not a defect of BCPL but rather of the way other things
> were built on top of it.

Or not built.

I'm still a fan of BCPL, though. I just think that at this time it's more
like a curiosity. You use it for the pleasant feeling of nostalgia. Sort
of like driving a '57 Caddilac.

Oh well, AmigaDOS is being redesigned from scratch without BCPL. It's
still going to have some BPTRs in there, because it'd break existing code
to remove them. Pity CAOS was stillborn.
-- 
-- Peter da Silva  `-_-'  ...!hoptoad!academ!uhnix1!sugar!peter
-- Disclaimer: These U aren't mere opinions... these are *values*.