On Fri, Oct 26, 2007 at 09:56:18AM +0200, Abdelrazak Younes wrote:
> Andre Poenitz wrote:
>> On Thu, Oct 25, 2007 at 12:41:06PM -0000, [EMAIL PROTECTED] wrote:
>>> URL: 
>>> http://www.lyx.org/trac/file/lyx-devel/trunk/src/mathed/InsetMathFrameBox.cpp?rev=21198
>>> ==============================================================================
>>> --- lyx-devel/trunk/src/mathed/InsetMathFrameBox.cpp (original)
>>> +++ lyx-devel/trunk/src/mathed/InsetMathFrameBox.cpp Thu Oct 25 14:41:02 
>>> 2007
>>> @@ -14,7 +14,6 @@
>>>  #include "MathData.h"
>>>  #include "MathStream.h"
>>>  #include "MathSupport.h"
>>> -#include "Color.h"
>>>  #include "frontends/Painter.h"
>>>   @@ -50,7 +49,7 @@
>>>     FontSetChanger dummy(pi.base, "textnormal");
>>>     Dimension const dim = dimension(*pi.base.bv);
>>>     pi.pain.rectangle(x + 1, y - dim.ascent() + 1,
>>> -           dim.width() - 2, dim.height() - 2, Color::foreground);
>>> +           dim.width() - 2, dim.height() - 2, Color_foreground);
>> I really hate Mixed_underScore_andCamelBumP names
>
> Well, we have to standardize on something with enums with are not really 
> typename and not really constant, what would you prefer?

As the name for the type I'd like to have CapitaliedCamelBump,
that's how >95% of our types look like.

> ColorForeground: this looks to much like a typename -> misleading
> ForegroundColor: same.
> COLORforeground
> COLORForeground
> Foreground_COLOR
> ForegroundCOLOR
> Foreground_color
> Foreground_Color

For the name of the items I do not care too much as long as they are
consistent, recognizable and not mixed_underscore_andCamelBump.

In the old days there seemed to be a preference for ALL_CAPS. This
namespace is also used by macros, but we use only very few macros
ourselves and to a certain degree macros and enums 'behave likewise',
so that's probably not a bad choice. It feels a bit 'heavy', though.

A capital initial letter other than in ALL_CAPS would clash with our
'namespace' for names of types. Not nice. 

Leaves starting with lower case.

Slightly augmented version of your list:

 colorForeground
 foregroundColor
 colorforeground
 foreground_COLOR
 foregroundCOLOR
 foreground_color
 foreground_Color

The first two look ok. They do use the same 'namespace' as functions,
however, functions names usually have a (...) attached to them, so
the difference is easily spotted. #6 looks ok for the same reason.

So my list of acceptable choices would be something like

 COLOR_FOREGROUND
 FOREGROUND_COLOR

 colorForeground
 foregroundColor

 color_Foreground
 foreground_Color
 


Andre'

Reply via email to