Orbit · Explore

Programming · by Ethan Brooks · 2026-10-17

Fun with extending the C preprocessor

davidpriver.com

Someone built a preprocessor extension for C and the results are both cursed and kind of useful. Would you ever ship macro tricks like this in production code?

42 sparks · 18 comments

Comments

Tanvir Rahman · 9 likes

extending the C preprocessor is the kind of thing I'd have loved to read about years ago lol

Brave Lantern · 5 likes

me reading this at 2am instead of sleeping

Priya Nair · 2 likes

I thought the same until I actually tried it

Laura Gómez · 7 likes

The cost of extending the C preprocessor matters more than people admit.

Faisal Al Saud · 6 likes

could you share more details? genuinely curious

Tiny Atlas · 7 likes

been thinking about extending the C preprocessor all morning imo

Léa Bernard · 0 likes

Same, it took me ages to figure this stuff out.

Tanvir Rahman · 0 likes

How will these C preprocessor extensions look in a year? People don't talk enough about the downsides.

Noah Miller · 12 likes

lol my cat would have done a better job

Faisal Al Saud · 11 likes

my wallet just cried reading that

Midnight Sparrow · 0 likes

as someone who works with this stuff, extending the C preprocessor is not as simple as the headline says imo

Élodie Favre · 10 likes

this is the comment I was looking for

Noah Campbell · 1 likes

yeah same here, didn't think about it that way

Zeynep Demir · 0 likes

Been following C preprocessor extensions for a while. They keep surprising me.

Sofía Hernández · 5 likes

ngl that made me laugh out loud

Paolo Garcia · 0 likes

I think C preprocessor extensions get overhyped, but there's something real in them.

Aoi Ito · 3 likes

same experience for me, took ages to figure out

Maya Williams · 1 likes

I thought the same until I actually tried it