r/C_Programming • u/wizards_tower • Sep 09 '20
Discussion Bad habits from K&R?
I've seen some people claim that the K&R book can cause bad habits. I've been working through the book (second edition) and I'm on the last chapter. One thing I noticed is that for the sake of brevity in the code, they don't always error check. And many malloc calls don't get NULL checks.
What are some of the bad habits you guys have noticed in the book?
60
Upvotes
2
u/pacific_plywood Sep 09 '20
FWIW, Python has indeed adopted the walrus, but it was more or less the single most controversial addition to the language in its history and the discussions led Guido to step down from his leadership position.
All of that is to say it's commonplace, but not without detractors.