Live data from Hacker News

Deconstructing K&R C Is Dead (2015)

c.learncodethehardway.org

21–30 of 190 posts

Re: Deconstructing K&R C Is Dead (2015)

#21
Do remember that this guy wrote:

"I’ve more or less kept my mouth shut about some of the dumb and plain evil stuff that goes on in the Rails community. As things would happen though I’d take notes, collect logs, and started writing this little essay. As soon as I was stable and didn’t need Ruby on Rails to survive I told myself I’d revamp my blog and expose these fucks."

and:

"After Mongrel I couldn’t get a gang of monkeys to rape me, so forget any jobs. Sure people would contact me for their tiny little start-ups, but I’d eventually catch on that they just want to use me to implement their ideas. Their ideas were horrendously lame. I swear if someone says they’re starting a social network I’m gonna beat them with the heel of my shoe."

So that is very much his style of writing.

Re: Deconstructing K&R C Is Dead (2015)

#22
post #8

This is obviously a bitter rant, and devolves into uncomfortably ageist territory about halfway through. I do agree that we should be moving away from C and C++, though. It's pretty simple, really: C was a pretty good language in 1978. We didn't know a lot of things in 1978 that we do now in 2016. It now makes sense to revisit those decisions in light of nearly 40 years of practice. The so-called "PL Renaissance" has…

It's remarkable, though, that it's taken 40 years to make much head way in replacing C. There's still a lot of C code out there, and a lot of new C code still being written.

Lots more will be written until there is a viable replacement for C in embedded systems.

Re: Deconstructing K&R C Is Dead (2015)

#23
Oh Zed. Really?

There is nothing wrong with carefully crafted C code for applications were it is the best suited tool. Sure, there are sharp edges. True you can write crappy, security nightmare code.

You do make some good points. I agree Go is fantastic. Rust is coming along as well. However, C still runs the world. That's not changing anytime soon. Not with the explosion of IoT and GPU type devices. And, hello Linux kernel and all the glorious command line tools on nix.

Try using Go or Rust (love both, x2 for Go) to allocate say a hundred GB of memory for some huge/fast in-memory data processing. Let me know how far you get.

Your rant is as polarizing as those who are blind to C's flaws (yes, there are a few). Stop saying "don't write C", that's just childish. Rather, what about "let's write better, less security flaw prone C."

As an engineer, one ought to choose wisely when choosing tools. This means pros and cons and balanced unemotional decision making. Not a holy war against a given tool.

And I am a professional programmer.

Let's do C where C makes sense.

(Edit: fixed typos)

Re: Deconstructing K&R C Is Dead (2015)

#24
I can't really speak for Zed's expertise and/or value to the programming community. From what I gather, a few of his projects are widely used (Mongrel comes to mind), and he seems to know his stuff pretty well. I also identify strongly with his Programming Motherfucker[0] rant.

But man, the guy is insecure to the point of requiring therapy or something. He seems obsessed with his image and status, and the slightest criticism will cause him to lash out in an immature and ridiculous manner. Past rants have him making lewd comments about penis-sizes and challenging others to a physical fight[1].

It's a shame, because if he just relaxed a bit and took criticism gracefully, he'd probably find himself to be a bit more valuable to the community and employers, and would actually be a pretty decent dude. Instead, his writing seems to reek of a constant need to validate and defend himself.

This is probably an unfair comparison, but I can't help but think of Terry Davis: a brilliant programmer hindered by mental issues. Schizophrenia is obviously not the same as insecurity, but I think the situation here is somewhat similar.

[0] http://programming-motherfucker.com/

[1] http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto

Re: Deconstructing K&R C Is Dead (2015)

#25
post #6

Low level languages are tough. Gaining a mastery of C does require knowing quite a few strange rules and quirks and it's certainly a bit harder than learning Python. The C FAQ does a good job of illustrating some of the more confusing parts. Sure, I wish I could write Go instead, but that isn't going to happen on the many embedded systems I work on. This is a rather strange and insulting article. I'm not sure why Zed…

> nor do I understand why he's angered that individuals know about undefined behavior in C

If you read the first part of that same sentence, it should give you a clue.

Re: Deconstructing K&R C Is Dead (2015)

#26
I went to the Internet Archive just to see what all the fuss was about. Hate to say it, but I agree with the detractors. He seems to be completely missing the concept of preconditions. If the preconditions are met, the code is good; if the preconditions aren't met, undefined behavior occurs. Most people programming C or C++ for more than 10 minutes learn to pay attention to these things. The chapter would have been much better if it would have stuck to the importance of validating preconditions, rather than simply pretending they don't exist.

Good riddance.

Re: Deconstructing K&R C Is Dead (2015)

#27

I can't see how you could say C is dead when there isn't really anything that can replace it. I'll take it as dead when the Linux kernel, or it's futuristic replacement, is written in something other then C. If you are talking about at the user-space level, then yes I can see that. But you shouldn't assume your single use case, higher level user space apps, is the only use case.

In what way, specifically, is Rust unsuitable for building a kernel? There's no argument that the Linux kernel is currently written in C. But that doesn't prove that nothing exists that can replace C.

We can't say if Rust is a suitable replacement unless a a team tries to write a kernel in Rust, and then comes up with a comparative result.

Right now C is only the tried and true solution. The rest are possibilities only.

Re: Deconstructing K&R C Is Dead (2015)

#28
post #23

Oh Zed. Really? There is nothing wrong with carefully crafted C code for applications were it is the best suited tool. Sure, there are sharp edges. True you can write crappy, security nightmare code. You do make some good points. I agree Go is fantastic. Rust is coming along as well. However, C still runs the world. That's not changing anytime soon. Not with the explosion of IoT and GPU type devices. And, hello Linux…

> Stop saying "don't write C", that's just childish. Rather, what about "let's write better, less security flaw prone C."

A consistent theme throughout the article is that he's actually more interested in teaching people to write C well than fight with pedants. He's not torching his book, he's updating it and removing the contentious chapter. "let's write better, less security flaw prone C." is exactly what he's trying to say - the "don't write C" bit at the end is more about it being a dinosaur than a childish huff, though there is a little of that in that comment.

Re: Deconstructing K&R C Is Dead (2015)

#29
post #27

Earlier quoted context omitted.

In what way, specifically, is Rust unsuitable for building a kernel? There's no argument that the Linux kernel is currently written in C. But that doesn't prove that nothing exists that can replace C.

We can't say if Rust is a suitable replacement unless a a team tries to write a kernel in Rust, and then comes up with a comparative result. Right now C is only the tried and true solution. The rest are possibilities only.

There are two ways to interpret your post. The first is "there's no kernel written in Rust that is as complete as Linux". The second is "Rust is unsuitable for a kernel". The first interpretation is obvious and completely uninteresting; the second is something you haven't supported at all.

Re: Deconstructing K&R C Is Dead (2015)

#30
post #24

I can't really speak for Zed's expertise and/or value to the programming community. From what I gather, a few of his projects are widely used (Mongrel comes to mind), and he seems to know his stuff pretty well. I also identify strongly with his Programming Motherfucker[0] rant. But man, the guy is insecure to the point of requiring therapy or something. He seems obsessed with his image and status, and the slightest c…

Being passionate about things and having opinions can mean that you eventually burn out on something and for the sake of your own mental health have to move on.

I don't think Zed's doing anything wrong. He's saying what he thinks needs to be said, he's challenging the complacent, and he's not pulling any punches. If you don't like his attitude there's plenty of other people to listen to. I appreciate that he's out there making noise, getting people to re-think their assumptions about programming.

If you live life by particular principles sometimes you have to take the hard road. You can't argue it hasn't been an interesting path.

Post reply on HN