Live data from Hacker News

Deconstructing K&R C Is Dead (2015)

c.learncodethehardway.org

51–60 of 190 posts

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

#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.

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

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

[deleted]

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

#53
post #38

The specific section of his 'Learn C the Hard Way' book that he's referring to was mostly, as I recall, complaining that the C string functions defined in K&R will fail when you don't pass them valid data, and therefore, they're fundamentally broken. Make of that what you will, but it seems to me that given all of the other ways that C can blow up due to programmer error, it seems reasonable to expect programmers to…

Yeah, I agree. This is similar to complaining that the plane was broken when you fly it into a mountain. I can see this being a minor issue when you're passing data to like strdup(2) from an unknown source, but you should be following the rule of "users do dumb shit." and check these things. C isn't designed to prevent you from hanging yourself because if it were to prevent you you wouldn't have enough rope to climb a mountain.

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

#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 complete novice to write some code that doesn't crash in C++ than it is in C, but not mastering it, or even be good at it.

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

#55
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.

Thanks for putting your finger on that.

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

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

Read the review over at hentenar.com, though I've never read Zed's work.

All I can say is the order of topics, the choice of topics and the quoted explanations would make for a very confused beginner. Especially the crusade he seems to have against strings and functions called incorrectly. That makes me think he should be teaching the language, not the language he wishes it were. Of course these are selective quotations so I can't draw too many conclusions.

Going on my time teaching C, I wouldn't even mention Duff's device or safer, better strings at this level. There's better ways to introduce defensive programming, along with a discussion of the pros and cons.

Oh, I'm past 50 so am clearly "doomed" and beyond help. Not that I'm sure what I need help with. Oh well. :)

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

#57

Earlier quoted context omitted.

Exactly. It's beyond my authority to change the language in use, but I would love to have alternatives to argue for. C isn't a terrible option, or is perhaps the least terrible option, but it's not leaving my corner of the corporate universe until a proven alternative establishes itself.

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

Doesn't the design of Go, the language, basically require that the implementation involve a runtime with a GC system? So that would make it a non-viable choice for programming in applications where memory footprint and real-time performance must be tightly controlled.

Rust is a better choice, and it's designed with this in mind. It's still young, though, and I think there might be some as-yet-unsolved issues (these are things I've vaguely heard of and could be totally off-base) like binary size, ease of dealing with raw pointers, etc.

If I was doing this sort of programming for a personal project, I'd probably try using Rust, because I like it.

Dunno about Swift, though IIRC the current reference implementation may also currently rely on GC.

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

#58
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.

People are writing a kernel in rust[0], and a pretty good unix-like at that. I don't like rust, but it's a fine language for that and in general. [0] http://www.redox-os.org/

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

#59

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 m…

He had this big rant about Debian that was about Debian trying to lock people in because of 'business' or something absurd like that. Debian is a non-profit! I found it irritating because it wasn't even "he's being a jerk, but he's right". It was just plain wrong.

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

#60

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 m…

[deleted]
Post reply on HN