3 ms·
Yes, I think that's the key. I'm not a C programmer, and though I do have a basic understanding of pointers, I still find them rather confusing because of the
by veddox 6y ago
Yes, I think that's the key.
I'm not a C programmer, and though I do have a basic understanding of pointers, I still find them rather confusing because of the indirection they introduce. I could follow the first example just fine (because I know how to deal with linked lists from Lisp), but the second gave me rather a headache (two levels of indirection!).
However, I think that once you've really understood the concept of pointers - and I'd expect that from all kernel developers - the second example really wouldn't be any harder to understand than the first. And yes, then it is the cleaner way of doing things, and therefore to be preferred.