
From: "Arkadiy Vertleyb" <vertleyb@hotmail.com>
"David Abrahams" <dave@boost-consulting.com> wrote
I am defining a macro,
BOOST_PARAMETER_KEYWORD(tag_namespace, name) [snip] will interact more smoothly with editors and pretty-printers. So I can't see any good reason not to require the semicolon. Arguments?
We have a similar problem in typeof, and at this point semicolon is not required. This leads to all the problems with the editor that you mentioned, and, if the user does supply the (second) semicolon, some compilers emit warnings, so I am by no means happy with the situation.
Yep.
However, if the semicolon is required, and the user doesn't supply it, the compiler will produce an error message, which will expose implementation details of this macro, and most likely be of little help.
That error message will alert the user to having misused the macro. A glance at the documentation will reveal that a semicolon is required. It really doesn't require that the user dig into the implementation details to learn that a semicolon is needed.
So, the choice is actually between two evels, and I am not really sure which one is less evel.
I don't see it as choosing the lesser of two evils.
Also, I think, this problem is very generic, and once it's decided which style is prefferrable, it may be a good idea to turn it into a guideline, so that it is consistent between the Boost libraries.
Agreed. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;