Live data from Hacker News

Deconstructing K&R C Is Dead (2015)

c.learncodethehardway.org

61–70 of 190 posts

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

#61
I've read/maybe even briefly participated in a discussion about Zed's book a couple years ago, and the technical debate went like this:

Z: K&R's strcpy is broken, e.g., you can forget to null-terminate the string. Mine is safer.

Ohters: It's not broken, of course it'll do something unpredictable if you break its preconditions.

Z: strcpy is still broken.

Others: Your function will break too if you pass it the wrong length.

Z: This cannot happen, K&R strcpy is broken, mine is safe.

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

#62
post #54
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…

> Low level languages are tough I disagree. Low level languages, especially C, are the easiest to master. K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline. C++ on the other hand is extremely difficult to master. Just have a look at the rules for Rvalue references and you will see what I mean. It may be easier for a complet…

> K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline.

I am a huge C fan but this is not true at all. C has tons of pitfalls, especially with modern UB-aggressive optimizing compilers. There are a lot of rules you need to be aware of that are not naturally-occurring results of the fundamentals.

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

#63

Earlier quoted context omitted.

What in particular makes Rust (or Go or Swift) unsuitable?

Go is unsuitable as a replacement for C because it is garbage collected. End of discussion. Rust is unsuitable as a replacement for C because its memory management is poorly thought out (ie. its a joke). Here's the relevant paragraphs from the Rust FAQ. Really? "Rust avoids the need for GC through its system of ownership and borrowing, but that same system helps with a host of other problems, including resource manag…

This post is a joke without a material argument to support your claim.

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

#64
post #48

Earlier quoted context omitted.

What in particular makes Rust (or Go or Swift) unsuitable?

Ironic, but the one think they are missing is an easy convenient way to call C libraries. Rust is very promising language, but unless you plan to write everything from scratch, you have to depend on 3rd party driver implementations for most stuff. Databases for example. There isn't a single database vendor that has Rust drivers.

Calling C from Rust is very convenient. All you have to do is declare the structs and function signatures and then it's like calling any other unsafe function.

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

#65
post #54
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…

> Low level languages are tough I disagree. Low level languages, especially C, are the easiest to master. K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline. C++ on the other hand is extremely difficult to master. Just have a look at the rules for Rvalue references and you will see what I mean. It may be easier for a complet…

K&R book is the only book you need to read to know everything about C.

Absolutely not.

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

#66
post #51
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…

Despite having a veneer of a good comment, well written, sourced with links, and starting with some (faint) praise - it's actually just an ad hominem, and not appropriate here.

It's not really ad hominem. More like constructive criticism of his rhetorical style.

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

#67
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…

Casually blaming character differences on assumed mental issues is pretty crappy.

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

#68
post #43
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…

In commenting on how Zed thinks too much about his self-image, you criticise how he comes across image-wise...

It's pretty difficult to sail upwind by heading directly into the wind. So, don't point into the wind if you want to get further upwind.

I don't have an opinion on the actual topic, but whether someone's goal is others' perception of them, or they are just poorly optimizing it as a proxy for their sense of self worth, attacking every criticism head on could undermine how others perceive them, or it could waste their time and mental energy compared to other things they actually care about more than the measure of their achievements based on others perceptions.

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

#69
K&R C was my introduction to real programming. I treated it ever since as a book, not a reference. Does that make sense? For me it was a glance into the mind of the creator of the language. Yes, some of the ways of programming were flawed in a way that results in today in many terrible things, not the least in which is death. But I was able to outgrow K&R, to learn better things, with its succinct language reference as my wings. I was fine not learning security oriented programming immediately. And I certainly enjoyed learning it with minimal snark and curse words. Maybe my method was harder, really? Learning things without you telling them to me? Maybe, don't really care. Maybe people don't like your essay because it's essentially shitting on a reference to a language. That is what K&R was in the beginning. It morphed into something else by your demands not the authors. Let my hero rest in peace. Learn to breathe. C is as dead as Latin is.

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

#70
post #54

Earlier quoted context omitted.

> Low level languages are tough I disagree. Low level languages, especially C, are the easiest to master. K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline. C++ on the other hand is extremely difficult to master. Just have a look at the rules for Rvalue references and you will see what I mean. It may be easier for a complet…

> K&R book is the only book you need to read to know everything about C. All you need after you understand the fundamentals is a bit of discipline. I am a huge C fan but this is not true at all. C has tons of pitfalls, especially with modern UB-aggressive optimizing compilers. There are a lot of rules you need to be aware of that are not naturally-occurring results of the fundamentals.

Out of curiosity, do you have an example?

Maybe I live in a C reality distortion field. :)

Post reply on HN