Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"The Curious Case of the Longevity of C"

79 views
Skip to first unread message

Lynn McGuire

unread,
Oct 5, 2017, 8:25:14 PM10/5/17
to
"The Curious Case of the Longevity of C"
https://www.ahl.com/ahl-tech-the-curious-case-of-the-longevity-of-c

"It is the early 1980s and you have been programming in BASIC, FORTRAN,
a bit of Pascal and you read in BYTE magazine of a hot new language: C.
Want to take a bet on it? There are only two bookshops in London that
stock computer books and just one book on C: K&R. The book is expensive,
about a week’s rent for a couple of hundred pages but it is the only way
to learn in these pre-Google 1 pre-StackOverflow/GitHub 2 days."

Yup, that is when I started looking at C. I bought TurboC in 1987 ???
and I was in love.

Lynn

bartc

unread,
Oct 5, 2017, 8:59:10 PM10/5/17
to
I bought a copy of K&R in 1982 (I think it was £12; my rent would have
been something over £20).

I sold it for £2 to a colleague who was more keen on it than I was.

My next purchase was in 1992, nearly £200 for a copy of MS Visual C,
which in the end I never used (I think I gave that away for nothing).

I don't think it's cost me any money since then.

--
bartc

Jorgen Grahn

unread,
Oct 6, 2017, 2:42:14 AM10/6/17
to
["Followup-To:" header set to comp.lang.c.]
In 1988 or 1989. Me and some classmates spent a lot of time in the
school computer lab. I stuck to BASIC and experimented a bit with
TurboPascal on the two PCs they had. But Johan wrote code in a
language called C (or TurboC). I peeked over his shoulder once or
twice. It looked alien and weird.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Ian Collins

unread,
Oct 6, 2017, 3:05:43 AM10/6/17
to
Um, bought my original K&R from the university bookshop in '79 for the
grand sum of £9.05 :)

--
Ian

Scott Lurndal

unread,
Oct 6, 2017, 8:37:52 AM10/6/17
to
Ian Collins <ian-...@hotmail.com> writes:
> Thunderbird/38.5.1
>In-Reply-To: <or6igm$itv$1...@dont-email.me>
>X-Received-Body-CRC: 1667187280
>X-Received-Bytes: 1651
Yeah, I bought mine in 1979 for about 8.95USD. And
a mimeo copy of Lion's book for about the same.

https://en.wikipedia.org/wiki/Lions'_Commentary_on_UNIX_6th_Edition,_with_Source_Code

Jens Stuckelberger

unread,
Oct 6, 2017, 10:12:51 AM10/6/17
to
On Thu, 05 Oct 2017 19:24:42 -0500, Lynn McGuire wrote:

> "The Curious Case of the Longevity of C"
> https://www.ahl.com/ahl-tech-the-curious-case-of-the-longevity-of-c

As curious as the longevity of the wheel. Which many try to
reinvent, over and over again.

Richard

unread,
Oct 6, 2017, 1:39:00 PM10/6/17
to
[Please do not mail me a copy of your followup]

Lynn McGuire <lynnmc...@gmail.com> spake the secret code
<or6igm$itv$1...@dont-email.me> thusly:
It wasn't the only way to learn C and in fact wasn't the way that I
learned it. The Bell Labs Unix editions had a command called "learn"
and you could type:

$ learn C

at the command prompt to get an interactive tutorial on the language
syntax and writing programs in it. Even though I already understood
the difference between the address and the data at that address, for
some reason the * syntax threw me off on that first attempt to learn
C. I didn't pick it up again for another 4 years or so and by then
I'd been doing enough programming that the * syntax didn't give me a
hard time anymore.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Ian Collins

unread,
Oct 6, 2017, 4:01:45 PM10/6/17
to
On 10/ 7/17 06:38 AM, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Lynn McGuire <lynnmc...@gmail.com> spake the secret code
> <or6igm$itv$1...@dont-email.me> thusly:
>
>> "The Curious Case of the Longevity of C"
>> https://www.ahl.com/ahl-tech-the-curious-case-of-the-longevity-of-c
>>
>> "It is the early 1980s and you have been programming in BASIC, FORTRAN,
>> a bit of Pascal and you read in BYTE magazine of a hot new language: C.
>> Want to take a bet on it? There are only two bookshops in London that
>> stock computer books and just one book on C: K&R. The book is expensive,
>> about a week’s rent for a couple of hundred pages but it is the only way
>> to learn in these pre-Google 1 pre-StackOverflow/GitHub 2 days."
>>
>> Yup, that is when I started looking at C. I bought TurboC in 1987 ???
>> and I was in love.
>
> It wasn't the only way to learn C and in fact wasn't the way that I
> learned it. The Bell Labs Unix editions had a command called "learn"
> and you could type:
>
> $ learn C
>
> at the command prompt to get an interactive tutorial on the language
> syntax and writing programs in it.

Are you my doppelganger?

I spent many an evening on the Uni VAX with K&R on my knee running
through "learn C" :)

I guess the combination of K&R and "learn" were one of the first forms
of interactive learning.

--
Ian

red floyd

unread,
Oct 6, 2017, 4:50:43 PM10/6/17
to
On 10/6/2017 10:38 AM, Richard wrote:
> Even though I already understood
> the difference between the address and the data at that address, for
> some reason the * syntax threw me off on that first attempt to learn
> C.

It took me a while, too.... then it hit me... the declaration int *p
says that *p is an int. Simple and obvious, but so unclear for quite
a while.


Richard

unread,
Oct 6, 2017, 4:53:58 PM10/6/17
to
[Please do not mail me a copy of your followup]

Ian Collins <ian-...@hotmail.com> spake the secret code
<f3q5ov...@mid.individual.net> thusly:

>On 10/ 7/17 06:38 AM, Richard wrote:
>> It wasn't the only way to learn C and in fact wasn't the way that I
>> learned it. The Bell Labs Unix editions had a command called "learn"
>> and you could type:
>>
>> $ learn C
>>
>> at the command prompt to get an interactive tutorial on the language
>> syntax and writing programs in it.
>
>Are you my doppelganger?

Heh :)

>I spent many an evening on the Uni VAX with K&R on my knee running
>through "learn C" :)

For me it was one of UDel's PDP-11/70 running umm.... Sixth Edition,
I think? I seem to recall it was a big deal when we got Version 7.
<https://en.wikipedia.org/wiki/Version_6_Unix>

Their other PDP-11/70 was running RSTS/E which was where I started out
programming in BASIC-PLUS.

>I guess the combination of K&R and "learn" were one of the first forms
>of interactive learning.

I bought the book several years later when I got into college as an EE
at UDel. I think it was the same year that I learned FORTRAN 77 :).

Ian Collins

unread,
Oct 6, 2017, 5:25:19 PM10/6/17
to
On 10/ 7/17 09:53 AM, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Ian Collins <ian-...@hotmail.com> spake the secret code
> <f3q5ov...@mid.individual.net> thusly:
>
>> On 10/ 7/17 06:38 AM, Richard wrote:
>>> It wasn't the only way to learn C and in fact wasn't the way that I
>>> learned it. The Bell Labs Unix editions had a command called "learn"
>>> and you could type:
>>>
>>> $ learn C
>>>
>>> at the command prompt to get an interactive tutorial on the language
>>> syntax and writing programs in it.
>>
>> Are you my doppelganger?
>
> Heh :)
>
>> I spent many an evening on the Uni VAX with K&R on my knee running
>> through "learn C" :)
>
> For me it was one of UDel's PDP-11/70 running umm.... Sixth Edition,
> I think? I seem to recall it was a big deal when we got Version 7.
> <https://en.wikipedia.org/wiki/Version_6_Unix>
>
> Their other PDP-11/70 was running RSTS/E which was where I started out
> programming in BASIC-PLUS.

Bloody hell, you are my doppelganger! That combination was my first
exposure to programming (a sixth form diploma) while still at school...
I wrote a console text editor with what would now be called
intellisense in BASIC-PLUS :)

--
Ian

Keith Thompson

unread,
Oct 6, 2017, 6:10:40 PM10/6/17
to
The principle is "declaration follows use".

Be aware that the rule should sometimes be taken more figuratively than
literally. For example:

int arr[10];

says that arr[10] is an int, but in fact arr[10] doesn't exist. Less
literally, arr[i] is an int for appropriate values of i.

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Richard

unread,
Oct 6, 2017, 6:20:13 PM10/6/17
to
[Please do not mail me a copy of your followup]

Ian Collins <ian-...@hotmail.com> spake the secret code
<f3qalk...@mid.individual.net> thusly:
My first major project in BASIC-PLUS was a program that would allow
users to submit print jobs into a queue that was processed once a week
into a magtape that was walked over to a Xerox laser printer so you
could get fancy printouts (with or without UDel seal watermark!). It
did a fancy cover sheet ASCII banner and had other options. I really
wish I had kept a printout of that program as it was my first real
accomplishment.

The closest I ever got to writing anything to do with editors was
playing around with TECO macros :).

Ben Bacarisse

unread,
Oct 6, 2017, 7:17:51 PM10/6/17
to
Lynn McGuire <lynnmc...@gmail.com> writes:

> "The Curious Case of the Longevity of C"
> https://www.ahl.com/ahl-tech-the-curious-case-of-the-longevity-of-c

Talking of some code from 1987:

"Today I can compile and run the code by making only minor changes;
register i; is no longer a thing so that piece of nostalgia had to
go."

There's no need for register declarations to go to compile old code.
Implicit int has gone, but then a program from 1987 is likely to be
riddled with implicit int so you'd have to use a compiler that supports
pre-ANSI C anyway.

Anyway, details aside, I don't think there is anything curious about the
longevity of C. It was originally a reasonable solution to a particular
set of problems and it then hitched a ride on the success of Unix in
universities just as university courses in computing were starting out.
It got a second wind by being the right size of language (and already
designed) when the micro-processor boom occurred. The third wind came
with Linux. It's hard to see what other language could reasonably have
been chosen for Linux.

Very often it's social and economic forces (like the skills of your
potential workforce knows) that determine the destiny of computer
languages. C# does not exist because it's good, it exists because it's
not Java, and it's used because Microsoft promotes it. That does not
means it's bad (I have no idea) but the technical merits are very much
secondary.

The underlying stance of the article is that C is terrible so why is it
still around, but that simply misses the point. Internal combustion
engines are terrible, so why are /they/ still around? At every point in
their history they made sense, often for non-technical reasons.
Alternatives programming languages stand a better chance because they
don't require vastly expensive global infrastructure to support their
use but the basic point remains -- what were the socially and
economically viable alternatives for the core tasks that C was used for?

> Yup, that is when I started looking at C. I bought TurboC in 1987 ???
> and I was in love.

My K&R is inscribed '81, so I was still at university. C was not used
at that university so I must have had an eye on my future employment
even then. My first job did indeed use C.

--
Ben.

Mr. Man-wai Chang

unread,
Oct 7, 2017, 9:00:13 AM10/7/17
to
I bought Turbo C++ 3.0 back in 1992, I think. Couldn't quite remember! :)


--
@~@ Remain silent! Drink, Blink, Stretch! Live long and prosper!!
/ v \ Simplicity is Beauty!
/( _ )\ May the Force and farces be with you!
^ ^ (x86_64 Ubuntu 9.10) Linux 2.6.39.3
不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa

Vir Campestris

unread,
Oct 7, 2017, 12:09:47 PM10/7/17
to
On 06/10/2017 23:20, Richard wrote:
> The closest I ever got to writing anything to do with editors was
> playing around with TECO macros:).

Teco? That takes me back!

Did you ever type 0yy instead of 0tt?

Andy

James Kuyper

unread,
Oct 8, 2017, 6:43:50 AM10/8/17
to
When I bought K&R C in 1979, it cost $24.95, a lot less than one week's
rent.

Richard

unread,
Oct 9, 2017, 11:50:32 AM10/9/17
to
[Please do not mail me a copy of your followup]

Vir Campestris <vir.cam...@invalid.invalid> spake the secret code
<orau82$kkj$1...@dont-email.me> thusly:
I don't recall, but yes 0yy would be a problem :)
0 new messages