Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You have 20 years of experience on this kind of stuff and don't recognize the textbook example code for handling the head pointer case of a linked list? Well, okay...

(It's at least 23 years old because I learned from textbooks that have this example code way back then. It probably dates all the way back to K&R.)



What textbook would that be exactly?? (not that it matters)

The point isn't "can I understand it"...

the point is "Would someone who hadn't seen it before have to do another mental operation to understand it?"

...and yes... dereferencing is another operation you have to do in your head to understand it.


Well, I'm at work so I can't dig around my library but it was easy enough using date range restrictions to find an academic example in Google that dates back to '99: http://cslibrary.stanford.edu/105/LinkedListProblems.pdf . (It was actually the first hit.) Searching further backwards in time is left as an exercise to the reader.

Multi-level pointer dereferencing is a fundamental C / assembly language skill and Linus' example was just about the most basic example there is.


We will have to agree to disagree on that point.... And I have just as much experience in c as Linus.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: