Boost logo

Boost :

Subject: [RFC] Parameters and variables naming unification
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-02-12 11:34:38


I'm going to propose some basic convention to **unify** naming of
template and function parameters, and variables that in my
opinion will help reading and reasoning about the code.

- Point for point type (not P)
- P or Pixel for pixel type
- Image for image type (not I, reserved for iterator, which is more
common tmpl. parameer than Image)
- V or View for image view type
- L or Loc or Locator
- I or It or Iterator

- view for image view, instead of img_view or image_view or v, where v
is also used as generic value, also as v1, v2, v2.
- img for image object
- chan for channel instead of c which is also used for color-related objects.
- point or pt for point object
- pixel or px for pixel object

I'm also going to rework the common comments like here

template <typename T1, // Model of ...
                 typename T2 // Model of ...

to read

/// \tparam T1 Model of ...
/// \tparam T2 Model of ...
template <typename T1, typename T2>

In fact, I've been replacing such comments already.

I'm going to proceed with this in some nearish future, unless there
are objections.

Best regards,

Mateusz Loskot,

Boost list run by Boost-Gil-Owners