News for hackers. Stuff that matters.
Re:Interview with Ken Thompson (2011) by pmoriarty on Monday August 28, 2017 @10:18AM (#15116665)
"The language grew up with one of the rewritings of the system and, as such, it became perfect for writing systems. ... It became the perfect language for what it was designed to do."

Really? Perfect? Why then are there entire books filled with "C gotchas" or "C traps and pitfalls"?

The language is an inconsistent, inelegant, error-prone mess that has left us with decades of serious bugs and security vulnerabilities. Yet Thompson describes it as "perfect". Sounds like he's been letting all the prizes he got get to his head.

Sure. The language was very influential, and much of the software we use every day was and still is written in it. That doesn't make it perfect, just popular -- often for legacy reasons, not because it's "perfect for writing systems".

Re:Interview with Ken Thompson (2011) by tyingq on Monday August 28, 2017 @11:22AM (#15117126)
I didn't read "perfect" in the same way. He just seems to be saying that it was developed in parallel with the OS, and so was tweaked to fit the needs of OS development at the time.

I read it more as "purpose built", and therefore, better than anything else that was available to him.

Re:Interview with Ken Thompson (2011) by etplayer on Monday August 28, 2017 @01:17PM (#15118266)
To me, C is honestly one of the most elegant languages there is, right next to Scheme.
Re:Interview with Ken Thompson (2011) by pmoriarty on Monday August 28, 2017 @01:19PM (#15118293)
I've heard similar opinions before, and would love to see this expanded on... in particular how it can be elegant compared to Scheme, which is by far the most elegant language I know.
Re:Interview with Ken Thompson (2011) by etplayer on Monday August 28, 2017 @01:23PM (#15118325)
Its simplicity is what I'm attracted to, and I think that's why I think Scheme is elegant too. It has less syntax than comparable languages, fewer keywords, a smaller standard library etc.

I'm not sure if it makes the case for elegance or if I'm misunderstanding it.

Re:Interview with Ken Thompson (2011) by pjmlp on Monday August 28, 2017 @02:17PM (#15118813)
Do you also consider simple having about 200 cases of UB on the standard?
Re:Interview with Ken Thompson (2011) by snakeanus on Monday August 28, 2017 @03:19PM (#15119258)
What is wrong with UB? Just take it to mean "not allowed".
Re:Interview with Ken Thompson (2011) by pjmlp on Monday August 28, 2017 @03:43PM (#15119447)
Do you know them all?
Re:Interview with Ken Thompson (2011) by euyyn on Monday August 28, 2017 @12:41PM (#15117937)
It can be perfect for something without being "perfect period".
Re:Interview with Ken Thompson (2011) by brianberns on Monday August 28, 2017 @10:26AM (#15116713)
C was certainly a major step forward at the time, but he does seem oblivious to its flaws (at least in this interview). I was also disappointed to see how he casually trashed C++ at the same time. Not very diplomatic.
Re:Interview with Ken Thompson (2011) by shmerl on Monday August 28, 2017 @12:39PM (#15117916)
If anything, it's also ironic, because a lot of downsides of C++ stem from its requirement to inherit C downsides.
Re:Interview with Ken Thompson (2011) by pjmlp on Monday August 28, 2017 @02:18PM (#15118830)
No it wasn't, because we already had Lisp and system programming languages like ESPOL, NEWP, PL/I, PL/M, PL/8,.... before C got released outside AT&T.
Re:Interview with Ken Thompson (2011) by throwawayfoo on Monday August 28, 2017 @02:24PM (#15118859)
Which tells you what?
Re:Interview with Ken Thompson (2011) by pjmlp on Monday August 28, 2017 @02:55PM (#15119087)
That C was certainly a major step backwards at the time, only adopted thanks to AT&T being forbiden to sell UNIX, thus deciding to offer the source code for a nominal fee to anyone that wanted to get a license to the source code.

Or to use a more modern example, UNIX was the browser and C was JavaScript.

Re:Interview with Ken Thompson (2011) by throwawayfoo on Monday August 28, 2017 @03:26PM (#15119319)
I never coded in the languages from your earlier post; I'd never have wanted to either. C was and is elegant and beautiful. It isn't so popular because of a AT&T. Look at Microsoft's power in the business world. Even with all their "practices", .Net still hasn't been beaten by Java in terms of popularity and widespread use. .Net is good, not saying it isn't, just so that's clear.
Re:Interview with Ken Thompson (2011) by pjmlp on Monday August 28, 2017 @03:42PM (#15119444)
Yeah, more than 200 elegant and beautiful documented cases of UB on ANSI C11 standard.