> I've known C for almost 20 years
The author is only 19 years old. I feel really dumb now.
You might also be interested in metalang99 by the same author.
Re:Algebraic Data Types for C99
by jacoblambda on Thursday May 09, 2024 @09:49AM
(#40308231)
Yeah xmacros (the style of macro use) are pretty fancy. "Classically" they are used for creating and accessing type safe generics or for reducing boilerplate for hardware register and interrupt definitions.
They are kind of cursed but at their core they are actually incredibly simple and a reliable tool for reducing cognitive complexity and boilerplate in C based projects.
I've known C for almost 20 years, and never would I have thought the macro system was powerful enough to allow such black magic.
This is awesome!