danielchasehooper.com/posts/typechecked-generic-c-data-structures

Preview meta tags from the danielchasehooper.com website.

Linked Hostnames

9

Thumbnail

Search Engine Appearance

Google

https://danielchasehooper.com/posts/typechecked-generic-c-data-structures

Type Safe Generic Data Structures 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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:



Bing

Type Safe Generic Data Structures in C

https://danielchasehooper.com/posts/typechecked-generic-c-data-structures

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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:



DuckDuckGo

https://danielchasehooper.com/posts/typechecked-generic-c-data-structures

Type Safe Generic Data Structures 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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:

  • General Meta Tags

    11
    • title
      Type Safe Generic Data Structures in C ・ Daniel Hooper
    • title
      X.com
    • title
      Bluesky
    • title
      Mastodon
    • title
      RSS
  • Open Graph Meta Tags

    5
    • og:title
      Type Safe Generic Data Structures in C
    • og:description
      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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:
    • og:type
      article
    • og:url
      https://danielchasehooper.com/posts/typechecked-generic-c-data-structures/
    • og:image
      https://danielchasehooper.com/images/ogimage.png
  • Twitter Meta Tags

    5
    • twitter:card
      summary_large_image
    • twitter:image
      https://danielchasehooper.com/images/ogimage.png
    • twitter:title
      Type Safe Generic Data Structures in C
    • twitter:description
      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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:
    • twitter:site
      @danielchooper
  • Item Prop Meta Tags

    7
    • name
      Type Safe Generic Data Structures in C
    • description
      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. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this:
    • datePublished
      2025-06-25T00:00:00+00:00
    • dateModified
      2025-06-25T00:00:00+00:00
    • wordCount
      1605
  • Link Tags

    4
    • alternate
      https://danielchasehooper.com/feed.xml
    • icon
      https://danielchasehooper.com/images/avatar2.jpg
    • stylesheet
      /css/bootstrap.min.css
    • stylesheet
      /css/common.min.b9cee6fd9a7a3c29612477543cb7e89bdcbb2ffa610a1a968e419aae47904296.css

Links

13