News for hackers. Stuff that matters.
Re:Why Not Just Do Simple C++ RAII in C? by jay-barronville on Wednesday May 22, 2024 @04:55PM (#40446421)
The funny thing is, examples of macro craziness only strengthen my point, because C++ inherits all of that in addition to its hidden behaviors and magical semantics. It’s rare to find serious C code doing a lot of crazy things behind macros. In my experience, the few exceptions I can think of include the GMP library and data structure-related code trying to emulate generics (mostly hash tables).
Re:Why Not Just Do Simple C++ RAII in C? by gpderetta on Wednesday May 22, 2024 @05:13PM (#40446627)
Yes, C++ is a larger language for sure. But because it has better abstraction facilities, macro hackery is less common.