3 ms·
> We do a lot of metaprogramming in the Linux kernel, implemented with some often truly hideous macro hacks. If you do a lot of meta-programming… why not used
by loup-vaillant 3y ago
> We do a lot of metaprogramming in the Linux kernel, implemented with
some often truly hideous macro hacks.
If you do a lot of meta-programming… why not used a more principled approach like Lex & Yacc? Why not go all the way to design mini-languages and compile them to C? Or design C extensions and compile them to C? You can still have good debugging support with line markers. https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
- bjourne 3y agoYou'd just be reinventing C++.
- Turing_Machine 3y agoI sure hope not.