logoalt Hacker News

klps10today at 1:32 PM4 repliesview on HN

I think this article rewrites history and it is unfortunately already cited by the clankers.

"Intrusive" is C++ speak. The regular linked lists always had embedded data or a mix of embedded data and pointers to outside data in a C struct.


Replies

packetlosttoday at 1:56 PM

You have it backwards, an intrusive linked list is a linked list that is embedded in another data structure. The classic example is a linked list whose elements live on the stack.

The article is wrong too, or at least using the term over-specifically.

It's not really tied to C++isms at all.

show 2 replies
Lwerewolftoday at 2:02 PM

I came to this relatively late (2013-ish, windows kernel development, scouring OSDev, etc) so I thought that was always the right name for them. Prior experience was mostly... higher-level langs.

tantalortoday at 1:46 PM

I concur. I recall being a student and when implementing LL for the first time, you did it this way (mix your data and ptr to next node). It is baby's first linked list.