It it technically possible in that C macros are supposedly Turing complete, but i mean i want something like being able to add a value to a variable, iterate through values (proper list would be neat but i'd be ok with a string of space separate values), etc.
> It it technically possible in that C macros are supposedly Turing complete
It isn't Turing complete, because it will always terminate, but you can make the execution time (number of execution steps) arbitrary large exponential in respect to the number of source lines.
> It isn't Turing complete, because it will always terminate
Well, i wrote "supposedly" because i didn't try it myself but found a post[0] that claims it is. The example is even about making loops.
But the point is that these aren't only way too hacky but also slow down compilation. I did use some of my own preprocessor hacks when i wanted to do some fancy stuff with it at the past to implement an RTTI system that allowed automatic serialization of structs with nesting and references and while it worked (x-macros FTW), it was cumbersome and slowed down compilation so much that at the end i found it both much simpler and faster (in compilation time) to replace a ton of preprocessor macros with a code generator and a couple of #includes that included the generated code.
This is arguably already possible, and was possible even before c99 added variadic macros. Although the code is a bit cumbersome to write.