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

The author also misunderstands what "head" of a list is, adding more bad clutter to the code.

(Granted, the code in the original TED talk is broken, as it doesn't define "head".)

A linked list in C isn't a struct with a "head"; "head" is just a pointer pointing to the head element.

The OP article should be retracted.



How likely it is for code to be misunderstood depends on the code readability as well, not just on the person who gets it wrong. Personally, I find the style of Linux lists unintuitive. To me it seems a case of sacrificing code readability to workaround limitations of the C language.


I don't see what you're saying.. the OP added that bit (the IntList struct) himself but it doesn't really change the scenario or take away from what he is trying to explain.

But it should be retracted? Really?




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

Search: