Tech article

Fun Extending the C Preprocessor

No preview is available. Read the original article for the full story.

Hacker News | Oct 15, 2026 | david2ndaccount

Automated excerpt

C2Y Compiler / Interpreter / REPL for fun. write a C Preprocessor (also known as the CPP). Instead I'll focus on some fun ways I've extended the C goofy. If you have an #define MAP_2(m, x, ... ) m(x) MAP_1(m, __VA_ARGS__) #define MAP_3(m, x, ... ) m(x) MAP_2(m, __VA_ARGS__) #define MAP_4(m, x, ... ) m(x) MAP_3(m, __VA_ARGS__) #define MAP_5(m, x, ... ) m(x) MAP_4(m, __VA_ARGS__) #define MAP_6(m, x, ... ) m(x) MAP_5(m, __VA_ARGS__) #define MAP_7(m, x, ... ) m(x) MAP_6(m, __VA_ARGS__) #define MAP_8(m, x, ... ) m(x) MAP_7(m, __VA_ARGS__) each function-like macro over and over again.

Selected automatically from source text; not independently written or fact-checked. Read the original for full context.

Read the original article

Read next

AI briefing: recent picks

More stories to explore