Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Now you have a additional stage in your build, a bunch of new code to maintain, and either a bespoke language embedded in your standard C++ or a bunch of code emitting C++ separately from the code it logically belongs with.

The preprocessor is already a bespoke language embedded in your C++, and code written in it is generally harder to maintain than, like, Python.

The cost of doing something non-standard is real, but not infinite; at some point the benefit in code maintainability and sanity is worth it.



The preprocessor is part of C++.

I agree that you can go too far with it and it becomes better to do it a different way, but the X-macros technique is straightforward and easy to understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: