3 ms·
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 does
by alisonkisk 6y ago
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.
- rossitblt 6y agoHow 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.
- djeiasbsbo 6y agoI 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?