Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


[This should have gone out last night already, somehow didn't make it off my computer.]

On 01/23/2012 11:08 AM, Marcel Metz wrote:
I oppose to the "macros improve readability" argument, these macros
don't improve readability, they hide some regular execution from the
programmer. You would need to know the structure of the macro to
completely understand what the code is doing which could be a problem
for developers that are not aware of the side effects of the macros.
When reading the regular code the keywords that change the execution
would stand out while the macros could easily be skipped.

Indeed, macros with hidden control flow magic are extra evil. C++ offers poor abstractions in this regard, but macros overall bring more pain than relief, so one generally has to bite the bullet and write some repetitive -- albeit trivial -- boilerplate.

However, I have another question: I notice that, while most occurrences are replaced with SAL_WARN, some were left as OSL_ENSURE (which I changed to SAL_WARN; one missed a comma, anyway) and some are changed to SAL_INFO. Was there some rationale for that? Anyway, pushed now (and additionally removed some newly unnecessary #include "tools/diagnose_ex.h").

Thanks,
Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.