Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2005-07-14 16:47:22


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Dave Steffen

> As others have
> pointed out, it's more convenient in many ways,

It's more convenient in exactly one way only: a particular *editor* has trouble
properly automatically formatting code. The last thing we should be at all
concerned about is automatic formatting in some editor.

> and IMHO more
> "natural" to have the semicolon.

You couldn't have said it better. This is *precisely* why there shouldn't be a
trailing semicolon. This mentality needs to be utterly broken--it is the
primary reason that macro-related problems come up. Macros are not functions.
Invocations are are not expressions, they are not statements, and they are not
declarations. They are not part of the syntax model of C++ at all. If you get
rid the preconception that they are (or should be), it is actually quite a bit
_less_ natural to have the trailing semicolon. It means that the macro only
accomplishes *part* of its function--it only generates *part* of the code.
Sometimes that's necessary; this isn't one of those cases. The viewpoint that
must prevail is that macros are code writers.

Regards,
Paul Mensonides


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk