3 ms·
Hey, it's pretty nice. Reminds of the old adage - You never code in plain C, you need to first #define some macros and then you can proceed with metaprogrammin
by NullPrefix 6y ago
Hey, it's pretty nice.
Reminds of the old adage - You never code in plain C, you need to first #define some macros and then you can proceed with metaprogramming
- mycall 6y agoUnless you are doing embedded programming.
- asguy 6y agoEspecially when you are doing embedded programming. You think those GPIO registers are going to encode themselves?
- kettro 6y agoMacros are the lifeblood of embedded C. I have a use case where I need to read, shift, and OR a value, then write back. If I need to do that for more than 1 thing, sure as shit I'll write a macro.
- taeber 6y agoThank you! I'd much prefer to not have to use macros, but I tried to make the with/withif mimic what I wish was a real C statement.