Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To be clear, the linux approach doesn't need to "generate" functions: one can define the common operations as functions (and indeed, the linux kernel does this) that can be used for all list types.

The list operations themselves (iterating, adding list nodes, removing list nodes) are all type safe (and can be placed in normal functions), the piece that gets funky is only examining the element content (which uses `container_of`).

There's no reason to speculate on the origin of the the bsd and linux approaches here, and the speculation given is highly questionable.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: