Phango

Alix Pexton _a_l_i_x_._p_e_x_t_o_n_ at _g_m_a_i_l_._c_o_m_
Sun Nov 18 03:32:10 PST 2007


renoX wrote:
> Sean Kelly a écrit :
>> Janice Caron wrote:
>>> On 11/17/07, Lars Ivar Igesund <larsivar at igesund.net> wrote:
>>>>>> Will both libraries adopt the same style (naming conventions,
>>>>>> capitalization, etc...)?
>>>>> I surely hope so. ++myVote
>>>> You understand that that would mean Phobos gaining Tango's style?
>>>
>>> Oh I don't think so. Walter is quite clear that module names should be
>>> lowercase, and I agree with him.
>>
>> What is your objection to CamelCase module names?
> 
> Easy: when in Romes do like Romans i.e. coherency beats 'invent your own 
> style' any time of the day, otherwise big projects looks ugly.
> 
> So Tango should really follow convention used by Walter in Phobos.
> 
> Not following this simple rule looks 'amateurish' from Tango's guys, 
> sorry for the harsh word but that's my view.
> 
> renoX

I agree, I don't know where it started, but I got used to the convention that IdentifiersLikeThis were classes onesLikeThis were instances and OTHERS_LIKE_THIS constants, leaveing alllowercase for modules/namespaces/short-term-variables.
In an OO lang, its nice to look at an identifier and be able to consistently know if its a class or an instance or a module. I want "InitailUpper.foo()" to always be a call to a static method of a class and not be confused with the disambiguation of a funcion within a module.
That initial capital shouts out to me to declare "I am a class", and in Tango, its not always the case. While you may be able to argue that modules are more important than classes, the link to the file system where rules over case may differ from those of the language, for me, take precidence, and wherever I have that issue, I resort to all lower-case. This is because it has been shown in experiments to be easier to read than all caps.
Tango's wild departure from myown naming style is one of the reasons that I was not an early adopter.

A...



More information about the Digitalmars-d mailing list