Type Safe Generic Data Structures in C

See my follow-up article: "A Fast, Growable Array With Stable Pointers in C"
I write type safe generic data structures in C using a technique that I haven't seen elsewhere1. It uses unions to associate type information with a generic data structure, but we'll get to that. My approach works for any type of data structure: maps, arrays, binary trees… but for this article I illustrate the ideas by implementing a basic linked list.
129 points by AlexeyBrin 18 days ago danielchasehooper.com 99 comments
Summary not yet generated for this article.

Comments (99 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open