Linus Torvalds' good taste argument for linked lists, explained
1–10 of 339 posts
Re: Linus Torvalds' good taste argument for linked lists, explained
#2Re: Linus Torvalds' good taste argument for linked lists, explained
#3Re: Linus Torvalds' good taste argument for linked lists, explained
#4Good post. Not a "show hn" though, is it?
Submitters: before putting Show HN on a title, please read the rules: https://news.ycombinator.com/showhn.html.
Re: Linus Torvalds' good taste argument for linked lists, explained
#5After reading for a minute I realized it's all about pointer and C specific stuff, I am not going to revisit that just for an article...
Re: Linus Torvalds' good taste argument for linked lists, explained
#6Re: Linus Torvalds' good taste argument for linked lists, explained
#7Re: Linus Torvalds' good taste argument for linked lists, explained
#8Good post. Not a "show hn" though, is it?
Correct—reading material doesn't qualify for Show HN. Otherwise every submission could have "Show HN" on it. We've taken that out of the title now. Submitters: before putting Show HN on a title, please read the rules: https://news.ycombinator.com/showhn.html .
Re: Linus Torvalds' good taste argument for linked lists, explained
#9Edit: Within 30 seconds this got downvoted by cowards with no response. Enough with lurker culture. Say something.
Re: Linus Torvalds' good taste argument for linked lists, explained
#10Not sure if this is actually a benefit or not. Edge cases are notoriously hard to debug, so it's sometimes actually nice to have a branch that specifically handles edge cases. Conceptually, it's also much more difficult to wrap one's head around. I would be interested to see how much of the cs101 solution is compiled away and if there are any tangible benefits of being clever here.
PS: If the linked list is stored in contiguous memory (if you're using a slab allocator, for example), you can actually be even more clever (I'll leave that as an exercise to the reader).