Boost logo

Boost :

From: Chris Uzdavinis (chris_at_[hidden])
Date: 2005-07-18 10:32:10


Rob Stewart <stewart_at_[hidden]> writes:

> Having said all of that, I find the following compelling:
>
> From: "Peter Dimov" <pdimov_at_[hidden]>
>>
>> If you let people add a semicolon after the macro, how can you change the
>> macro later in a way that doesn't tolerate a trailing semicolon? The
>> expansion of the macro is an implementation detail; the interface shouldn't
>> depend on a particular expansion.
>
> I have, in fact, seen situations where this arose. One has to
> visit many files to remove trailing semicolons if one uses a
> compiler that complains about the extras.
>
> On that basis, I am convinced that semicolons should be kept
> within the macro. Indeed, I plan to follow that approach in my
> own code henceforth, despite the formatting trouble it will
> cause.

It doesn't seem untenable to suggest having editor indentation logic
special-case a commented-out semicolon to be treated as a real
semicolon. The code colorizer could even color the comment the same
way as it colors a real semicolon, too.

  statement();
  MACRO() //;
  statement2();

Hmm.

-- 
Chris

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