« Return to Thread: Re using BREAK in 'C'

Re: Re using BREAK in 'C'

by Gerhard Fiedler :: Rate this Message:

Reply to Author | View in Thread

Olin Lathrop wrote:

> Gerhard Fiedler wrote:
>> It seems you answered this question: the original Pascal is
>> "essentially unusable" (your words). There are a number of usable
>> dialects, but no usable standard Pascal. OTOH, there is a C standard.
>
> That explains in part why C took off.  I never disagreed that C is
> more popular.  I'm only pointing out what a horrible language it is,
> and that the designers of that language should have known better
> because better constructs were already known at that time.

But you fail to understand that there are reasons for the popularity.
Reasons that may not be valid today, but that were at the time it
happened. You need to look at things from the perspective of the time,
not of today.

>> FWIW, I think the time scale you cite is misleading. I think you'd
>> have to start with the first compiler that was usable for the
>> implementation of an operating system. We know when that was for C;
>> when was it for Pascal?
>
> We're talking about concepts that K+R were almost certainly aware of
> when they were designing C.  The concepts behind Algol and Pascal
> were well publisized at the time.  Unless K+R were hiding in a cave
> while designing C and several years previously (and I really don't
> think so), they definitely knew better.

You didn't answer the question. The point is: was language design and
compiler technology advanced enough at the time so that an efficient
compiler could be made with reasonable effort that could have made it
possible to create efficient OS code with the Pascal of the time? If so,
why hadn't anybody written a suitable Pascal compiler in 1969 (when
development of C started) that could've been used?

K+R didn't set out to create a new language. They wanted to port an OS,
needed something better than assembly for that ("better" in this context
means mostly "more portable"), and had already B available. So they
developed B into C, apparently making it more suitable for their task at
hand -- not for you or me or anybody else. I don't think it became
widely used outside the small scope of Unix until the 80ies, by which
time the major features were already mostly settled -- not exactly as
design from scratch, but as result of an ongoing development where the
language was not a goal in itself, and the development of the language
had to fit into all the normal resource constraints.

You could just as well bitch at the Pascal developers for not making it
a generally usable language in the first place (that is, incorporating
the features that later, proprietary versions added to make it useable)
and standardizing it. If they had done this, maybe K+R would have felt
it was easier to adopt the new language rather than building on their
code for B. But there was no new language suitable for their task.

(I think I have to repeat it: If someone wants to understand why C is
how it is, IMO it's tremendously helpful to think of it more as a
"portable assembly" than a "high-level language". That's how it set out,
that's the mind frame that determined most of its basic structure. And
IMO it's perfectly compatible with what it is.)

Gerhard
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

 « Return to Thread: Re using BREAK in 'C'