Boost logo

Geometry :

Subject: [ggl] Reviewing GGL against Boost requirements
From: Mateusz Loskot (mateusz)
Date: 2009-04-30 10:30:51

Barend Gehrels wrote:
> Indentation makes it (my opinion) a bit less readable but is OK for me,
> I'll get used to it.

The point is that namespace are more like inclusion guards,
you rarely have more than 2 in single file.

> What I really find hard is the 80 characters. Even if namespaces are not
> indented.
> I tried to adapt and nearly all lines get broken in the most weirdest
> places, and/or spread over four lines. I just checked the Boost
> libraries and all the libraries I checked (mpl, lambda, proto, variant,
> spirit) do NOT follow it.


> So I suggest we'll be not too strict here. We're living in 2009, 80
> characters per line should be really over and done now.

I don't mind to allow more than 80 characters, let's say up to 100.
Most people work with big or multiple screens nowadays.

However and perhaps, for long and complex template/typedef definitions,
it may make sense to indent template params.
It's not uncommon in Boost too. For instance:

typedef typename ia_dflt_help<
     , function_object_result<UnaryFunc>
>::type reference;

or something like this

     typename T,
     typename P,
     typename A = std::allocator<T, P>
struct my_type

instead of all in single line.

Mateusz Loskot,

Geometry list run by mateusz at