Built into the compiler and language.......a prerequisite to the compiler........ same function, different place. Not that big a deal except for multiline macros being a bit silly.
Timeline
Post
Remote status
Context
4computers are fast. we have comptime now grandpa
You know, that would be useful when generating error correction matrices instead of having to precompute them into header files beforehand, but it's still not that big of a deal to keep the generation tools a separate thing that you just change the seed when you change your parameters and then rerun it.
I'm not a compiler designer obviously, but I think when everyone and their mother tells you preproc got out of hand, and everyone who is competent just rips it out completely, that should count for something.
>precompute them into header files
idk what exactly you're doing over there but I'm sure basically every programmer on the planet would prefer to do it in the same language as the actual fucking program instead of C preprocessor macros.
>precompute them into header files
idk what exactly you're doing over there but I'm sure basically every programmer on the planet would prefer to do it in the same language as the actual fucking program instead of C preprocessor macros.
I thought we were talking about comptime! 🥴
For avoiding crazy macros:
So, I kind of do that (I dont really use the c preprocessor outside of imports and constants obviously and a couple tiny macros for my logging system) but when I need to do things that would otherwise be a big macro, I just write another small independent tool in C and when I run make, then it runs those tools that do what a macro would have done, whatever it is.
The whole "get rid of the preprocessor" seems like an imaginary problem to me, but maybe I approach problems different than others.
For avoiding crazy macros:
So, I kind of do that (I dont really use the c preprocessor outside of imports and constants obviously and a couple tiny macros for my logging system) but when I need to do things that would otherwise be a big macro, I just write another small independent tool in C and when I run make, then it runs those tools that do what a macro would have done, whatever it is.
The whole "get rid of the preprocessor" seems like an imaginary problem to me, but maybe I approach problems different than others.
Replies
3
>I write C instead of preprocessor
>why do we need to get rid of the preprocessor
it seems like an imaginary problem to you because you already solved it, you're using comptime!
>why do we need to get rid of the preprocessor
it seems like an imaginary problem to you because you already solved it, you're using comptime!
Once again we had a communications breakdown based on perspective everybody clap
where did u get this picture of me