News for hackers. Stuff that matters.
Re:Macros on Steroids: How pure C can benefit from metaprogr... by Hirrolot on Thursday July 22, 2021 @04:00PM (#27923568)
> Native macros were never supposed to be used that way. If anything goes wrong, you still have to deal with that, and no IDE will save you from having to invoke your compiler with “preprocess-only” flag to see what you’re dealing with. Been there, done that, don’t want to do that ever again.

~95% of errors from Datatype99 can be observed from the console, I hardly ever run my compiler with -E. What I mean by IDE support is that you invoke macros in the same files in which you write ordinary C code, you can't do that with printf. Imagine that you write your tagged unions (datatype(...)) inside separate files, it's clearly less convenient than embedded definitions.

> Regarding the integration, I’ll take setting up an additional build phase (once) over having to debug C macros any day.

I can't remember the time when I debugged already written and tested macros from Datatype99/Interface99, to be honest.

There are no comments on this comment yet.