Posted Oct 13, 2011 4:36 UTC (Thu) by surajvijayan (guest, #17740)
Parent article: Dennis Ritchie RIP
I picked up K&R "The C programming Language" over 20 years ago. I, like many developers owe immensely to Dennis, not an exaggeration to say this book has been life changing for me.
Posted Oct 13, 2011 11:22 UTC (Thu) by jamesmrh2 (guest, #31680)
[Link]
Pretty much the same story for me. I don't know if I would have been a programmer if I didn't pick up that book.
Dennis Ritchie RIP
Posted Oct 13, 2011 12:07 UTC (Thu) by nix (subscriber, #2304)
[Link]
Even those of us who started with BASIC and Pascal... once C came into our ambit it was rarely if ever displaced. The others are learning languages. C is a *real* language.
Dennis Ritchie RIP
Posted Oct 13, 2011 15:08 UTC (Thu) by Baylink (subscriber, #755)
[Link]
A large part of the reason, IMHO?
How many versions of C are there? 2? Maybe 3? In 3 and a half decades?
How many versions of Your Favorite Programming Language are there? :-}
Dennis Ritchie RIP
Posted Oct 13, 2011 15:12 UTC (Thu) by nix (subscriber, #2304)
[Link]
2. Maybe 3. In three and a half decades. :)
Other languages are all very well, and many of them are very nice, but none ever quite manages to knock C off its perch.
Dennis Ritchie RIP
Posted Oct 13, 2011 18:51 UTC (Thu) by HelloWorld (guest, #56129)
[Link]
> Other languages are all very well, and many of them are very nice, but none ever quite manages to knock C off its perch.
While that is true, it doesn't mean C is a great language. Actually, I think it should have died a gory death 20 years ago. Unfortunately, it is too entrenched among systems programmers today to ever be replaced :(
Dennis Ritchie RIP
Posted Oct 13, 2011 20:53 UTC (Thu) by drag (subscriber, #31333)
[Link]
I don't see why. C is what C is and it's good at what it does that it is good at.
Tautologic
Posted Oct 14, 2011 1:36 UTC (Fri) by man_ls (subscriber, #15091)
[Link]
The same can be said about every other language, or about anything in fact! Tell you something, I have programmed using about a dozen languages now, and if I were to go back to C I would miss functional programming and (proper) objects a lot. But the heritage (from the syntax to so many ideas) is truly remarkable.
Dennis Ritchie RIP
Posted Oct 14, 2011 1:59 UTC (Fri) by galanom (guest, #80787)
[Link]
I think it is improper to post such a comment in the thread of the announcement of the death of its creator.
And yes, C is a great language. The only thing I miss from other languages is nested functions...
Dennis Ritchie RIP
Posted Oct 14, 2011 3:31 UTC (Fri) by HelloWorld (guest, #56129)
[Link]
> The only thing I miss from other languages is nested functions...
Then you either don't know enough other programming languages or you're just a really poor programmer.
Dennis Ritchie RIP
Posted Oct 14, 2011 6:33 UTC (Fri) by bronson (subscriber, #4806)
[Link]
WTF. Go pick fights somewhere else OK?
Dennis Ritchie RIP
Posted Oct 14, 2011 6:44 UTC (Fri) by chad.netzer (✭ supporter ✭, #4257)
[Link]
Must you really pick this thread to be so antagonistic in? Perhaps you could simply take galanom's *opinion* at face value.
Dennis Ritchie RIP
Posted Oct 14, 2011 7:34 UTC (Fri) by acooks (subscriber, #49539)
[Link]
Trolling on LWN? Really?
Dennis Ritchie RIP
Posted Oct 13, 2011 15:21 UTC (Thu) by Wol (guest, #4433)
[Link]
FORTRAN IV
Fortran 77
Fortran 90
Is there another later one?
But it seems like the old ones are still the best ones. (Oh, and I think there's only been one version of eg Forth, Smalltalk, and so on, but they're extensible (and extended till they're unrecognisable :-))
Cheers,
Wol
Dennis Ritchie RIP
Posted Oct 13, 2011 17:01 UTC (Thu) by daglwn (subscriber, #65432)
[Link]
Fortran 2003
Fortran 2008
Dennis Ritchie RIP
Posted Oct 16, 2011 3:58 UTC (Sun) by prudra (guest, #80820)
[Link]
I think the first Fortran that I used way back in 1968 on a CDC 6800(?) machine was called Fortran II.
Dennis Ritchie RIP
Posted Oct 14, 2011 4:13 UTC (Fri) by BenHutchings (subscriber, #37955)
[Link]
There are at least:
Unix versions 3-6 (not sure how large the changes were between these)
Unix version 7 / K&R 1st edition
ANSI C89 / ISO C90
ISO C99
ISO C11
But I don't think most C programmers have been much affected by changes after 'ANSI C', even though they are important to some.
Dennis Ritchie RIP
Posted Oct 14, 2011 16:44 UTC (Fri) by tjc (subscriber, #137)
[Link]
I recently had to change some code to compile with an older compiler, and the only C99 feature that I found hard to give up is the ability to declare variables anywhere in a block, instead of just at the top. It's easy to get used to that.
Dennis Ritchie RIP
Posted Oct 21, 2011 17:19 UTC (Fri) by giraffedata (subscriber, #1954)
[Link]
But I don't think most C programmers have been much affected by changes after 'ANSI C', even though they are important to some.
And they weren't even affected much by ANSI C. How often do you see "const" and bit fields used in C?
Tradition seems to be a big part of the culture of C. In addition to this not embracing new features, I think of tab characters and editor choice. I think that love of tradition accounts for its persistence more than anything.
Dennis Ritchie RIP
Posted Oct 13, 2011 21:57 UTC (Thu) by Julie (guest, #66693)
[Link]
The others are learning languages. C is a *real* language.
Quite. When I expressed an interest in learning C, my far more experienced brother told me to learn Pascal first instead. I conceded to his wisdom although I didn't understand why at the time - until I began tackling C...
I really liked Pascal. But I _love_ C.
I don't suppose there will ever be any furore over the passing of Ritchie as there is over Jobs. Says it all, really...
Dennis Ritchie RIP
Posted Oct 14, 2011 21:07 UTC (Fri) by dashesy (subscriber, #74652)
[Link]
I leaned C first, and a friend thought me pascal later when I had to use Delphi. The lengthy begin/end and semicolon separator concept was never appealing, C syntax is so natural and addictive.
I believe C is a better learning language because it is honest, and once you learn C the rest become more enjoyable too.
Dennis Ritchie RIP
Posted Oct 15, 2011 0:51 UTC (Sat) by HelloWorld (guest, #56129)
[Link]
C syntax is so natural and addictive.
Yeah right. Stuff like
void (*signal(int, void (*)(int)))(int);
is totally natural. And this is not some random contrived example, but a declaration from the standard library.
Dennis Ritchie RIP
Posted Oct 15, 2011 11:12 UTC (Sat) by mpr22 (subscriber, #60784)
[Link]
The syntax for declaring objects of pointer-to-function type being a bit hairy does not invalidate the general sentiment, and that particular case (declaring a function with a function-pointer argument and a function-pointer return type) is only a problem because the standards committee declined to set up the obvious typedef.
Dennis Ritchie RIP
Posted Oct 15, 2011 16:50 UTC (Sat) by HelloWorld (guest, #56129)
[Link]
The syntax for declaring objects of pointer-to-function type being a bit hairy does not invalidate the general sentiment,
It's not only that, the syntax for declaring pointers to arrays suffers the same problem. And what bugs me most about it is that it would have been trivial to fix this: make * a postfix operator and use "i int;" instead of "int i;" for simple declarations. signal then becomes
signal(*(int) void) *(int) void;
Unfortunately, it's not going to happen :(
Dennis Ritchie RIP
Posted Oct 17, 2011 0:56 UTC (Mon) by ncm (subscriber, #165)
[Link]
That's just its FORTRAN heritage.
When familiar element of a new language has stupid syntax, it's unforgivable -- yet they all do, even Go. Old languages get a free pass, because who knew, then? C has bad declaration syntax. LISP has ... well, everything. Yet they are above criticism. They have succeeded where so many others failed. To complain about them only reveals your insecurity.
C and C++ could still be fixed very simply by allowing a postfix dereference operator (in addition to the prefix one). "@" would serve.
Dennis Ritchie RIP
Posted Oct 17, 2011 11:45 UTC (Mon) by jwakely (subscriber, #60262)
[Link]
auto signal(int, void(*)(int)) -> void(*)(int);
Dennis Ritchie RIP
Posted Oct 17, 2011 13:21 UTC (Mon) by HelloWorld (guest, #56129)
[Link]
auto signal(int, void(*)(int)) -> void(*)(int);
Hey, let's be consequent ;)
auto signal(int, auto (*)(int)->void) -> auto (*)(int) -> void;
Dennis Ritchie RIP
Posted Oct 19, 2011 8:02 UTC (Wed) by ncm (subscriber, #165)
[Link]
That's just its FORTRAN heritage. When some element of a new language is stupid, it's unforgivable -- yet they all have them, even Go. Old languages get a free pass, because who knew, then?
C and C++ could still be fixed very simply by allowing a postfix dereference operator (in addition to the prefix one). @ would serve.
Dennis Ritchie RIP
Posted Oct 21, 2011 17:51 UTC (Fri) by giraffedata (subscriber, #1954)
[Link]
C syntax is so natural
I think that's the first time I've heard that claim made; the typical view of C is the opposite: in exchange for density (function per source character) and power to control the object code, C was made awkward.
The first time I saw "typedef int foo" I thought it was backwards and had a hard time remembering it; I still do. It isn't natural. It also isn't natural for an imperative like "a=3" to have a value, which is why it's so easy to stare at 'if (a=3) {printf("a is 3")}' and not see the error.
I wonder what a person's background has to be to find C syntax natural.
I believe C is a better learning language because it is honest, ...
I think "honest" here must mean "low level," i.e. the source code correlates plainly with the object code. If you're trying to learn how to write programs that control the contents of memory, etc., I agree C is the better learning language. If you're trying to learn how to write programs to solve a computational problem, a high level language would be better.
When I learned programming, my teachers went out of their way not to mention CPUs, memory, cycles, addresses, etc. and have me concentrate on generic computation. C would have seriously foiled their efforts.
Dennis Ritchie RIP
Posted Oct 13, 2011 13:10 UTC (Thu) by vonbrand (subscriber, #4458)
[Link]
Count me in. His books (starting with "The C Programming Language," first edition) were truly inspiring.
He will be remembered.
Dennis Ritchie RIP
Posted Oct 14, 2011 14:40 UTC (Fri) by ViralMehta (guest, #80756)
[Link]
And whenever you pick-up his book, you will learn 1 or 2 things new in C... RIP Dennis R.
Dennis Ritchie RIP
Posted Oct 17, 2011 15:16 UTC (Mon) by peter_w_morreale (subscriber, #30066)
[Link]
Amen.
I got mine in 1987. It was my second language after Fortran 77. Even without a CS background, its elegance and efficiency was an epiphany that cemented my career in software development,
Thank you Dennis (and Brian, and Rob). Your work has had more far reaching effects that any of you could have imagined.