News for hackers. Stuff that matters.
Re:Everything I wish I knew when learning C by user3939382 on Monday November 28, 2022 @10:25AM (#33774732)
The couple of times I tried to really learn C I ran into the same problems. I started by trying to answer two questions: what are the modern features of C that I need to learn to use it, and what style/rules should I follow.

What I found is a body of several C spec updates that are each defined in reference to previous C spec updates. So I'm supposed to... ? Learn C from the 70s and then study each version update and mentally diff everything to figure out what C is now?

Then in terms of rules and style, unlike when K&R C was published, I couldn't find any authority. Actually what I see is that even programmers who have been writing C for many years frequently debate what practices are correct vs not. You can see it in this very thread. Every language has this, but I've seen it much more with C than other languages.

Actually learning the material for me is hard when I can't even get a firm handle on what it is I'm supposed to learn.

Re:Everything I wish I knew when learning C by tmewett on Monday November 28, 2022 @10:40AM (#33774919)
Completely agree - that's exactly why I wrote this. Some of things I wrote even seem super obvious but with no real authority you wonder whether or not this is "the way" to do things. If you ever want to get some practical experience, we'll help you out if you want to contribute to Brogue :)
Re:Everything I wish I knew when learning C by philsnow on Monday November 28, 2022 @07:52PM (#33782201)
Replying here hoping that you'll have a better chance of seeing it: thank you for maintaining Brogue. I've sung praises [0][1][2] for years about the quality of the Brogue codebase (and the game itself).

[0] https://news.ycombinator.com/item?id=20560132

[1] https://news.ycombinator.com/item?id=19901128

[2] https://news.ycombinator.com/item?id=13594689

Re:Everything I wish I knew when learning C by tmewett on Wednesday November 30, 2022 @06:49AM (#33799465)
Thank you :) Though I should say, most of the code is by the original author Brian
Re:Everything I wish I knew when learning C by Gigachad on Monday November 28, 2022 @06:29PM (#33781398)
There are probably very few people learning C from scratch now vs just already knowing it from the 70s.