3 ms·
For some reason the Linux community became enamored of the `container_of` construct, which eases typecasting across related structures, and built all their quas
by wahern 5y ago
For some reason the Linux community became enamored of the `container_of` construct, which eases typecasting across related structures, and built all their quasi-generic data structures around it. Whereas the traditional BSD implementations (substantially unchanged since 4.4BSD) never needed that bit of black magic; developers simply learned to avoid playing fast-and-loose with struct types in the first place.
In general the BSD implementations are more type-safe (just plain type-safe, actually), and IMO easier to use and much simpler to understand.