3 ms·
Both are relatively trivial. Trading an if for an indirection is not necessarily "better", it's an option. As I said before, both ways are textbook basic singl
by muyuu 14y ago
Both are relatively trivial. Trading an if for an indirection is not necessarily "better", it's an option.
As I said before, both ways are textbook basic singly linked list deletions. Linus' version does the dummy pointer implicitly. Generally doing things like that requires an extra moment to realise what's going on.
The smartass idea that "anything that is understandable is equally understandable" simply falls flat in the face of reality.
To claim one piece of code to be better than another you need a more scientific argument than "avoiding an if" if you add something else (an indirection) instead.