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

Everything powerful is also potentially destructive. Macros have their places, but most of the time they are not the right solution. I too have removed most of my macros, and have a few that are worth to keep. Usually time saved with macro cleverness is paid off with time debugging with cryptic compiler behavior.

When there is no other way, wrapping multi-line macros in a do while and #define constants in parenthesis can definitely help.



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

Search: