Hacker News new | ask | show | jobs
by glouwbug 1491 days ago
Good stuff. void* in itself is great for generics. C does support a templating system, like C++, with a little (reasonable) preprocessor abuse. It gives great cache contiguous results: https://www.github.com/glouw/ctl
2 comments

Probably best to disclose you're pitching your own baby to us.

What do you feel this content adds in context of the article? I can't tell.

You mean why would anyone link another useful C library in a thread about C libraries - you can't tell?
Without any explanation it's probably not useful to most of us.
I thought "glouw" in the username here and in the username in the link was pretty obvious myself.
I mean, it’s not like I’m plugging retail source ;)
Yeah like I’m not gonna complain to my ad blocker :-)
they're kind in the same category to me, good to know both and compare them.
I'm confused. It's easy to emulate a set using a map, but how do you emulate a map using a set?
You model the key->value relationship, call it an association, and place associations in the set, where the equality/hash functions are performed on the association key.