[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Why is C so popular?



On Wed, 27 Aug 2003 21:21, Paul Johnson wrote:
> On Wed, Aug 27, 2003 at 01:11:08AM -0500, Alex Malinovich wrote:
> > The recent COBOL discussion has gotten me to thinking. Some languages
> > seem to be very popular in some situations. C is easily the dominant
> > language for most things Linux. So therein lies the question. Why,
> > exactly, is C so popular?
>
> It's relatively easy to learn, plus everybody else in the unix world
> uses C.  It's portable.  It helps to know your history:  C was created
> to write unix to begin with.

I thought that unix came first, then C, then unix was rewitten in C.

I still have Kernighan and Ritchie's 'The C Programming Language' first 
edition. It has a Bell Telephone Labs copyright notice from 1978 and is 
otherwise undated.

After some exposure to a Basic or 3, Fortran IV, and Cobol 1969?? I was 
extremely excited by K&R's exposition of the language. Somewhere around the 
same time I read 'Pascal - User Manual and Report' and mostly fell asleep as 
I waded through it.

C is popular IMO because it is exciting. Hackers hack because they find some 
problem/opportunity exciting. Consequently the two go hand in hand.

It can be as readable as cobol given a decent choice of variable names, and 
no, that Hungarian Notation propagated by Microsoft does not count.
As for the naming conventions used in cobol I can only be grateful that they 
were set when coding was done via 80 column punched cards, otherwise we'd 
have variable names longer than those absurd sequences of escapes you 
sometimes see in Perl.

C is easier to learn than shell scripting, the elements at least, much less 
Perl. I personally find it quicker to code a dirty fix in C than anything 
else and would not really consider shell programming for anything other than 
glue for a sequence of other commands.

Just my 2 bits.



Reply to: