← Back to team overview

openerp-community team mailing list archive

Re: CamelCase

 

CamelCase is java style. I prefer underscore and lowercase.

Nicola Riolini <nicola.riolini@xxxxxxxxx>写到:
>I don't like CamelCase very much, better underscore and all lower
>case...
>
>
>On 04/04/2014 14:08, Gianluca Milano wrote:
>> Hi all,
>>
>> IMHO underscore is more readable. But, I'm an OpenERP newbie, so I 
>> easily can adapt.
>>
>> Anyway to me is -1
>>
>> gianlucamilano <http://www.gianlucamilano.com/> 	
>> 	Gianluca Milano | Business Integrator
>> +39 081 194 65 159 | +39 335 60 10 512
>> gianlucamilano | Via Trepiccioni, 39 - 80078 Pozzuoli (NA) - ITALY
>> P.IVA IT07227561219
>> WebsiteGB <http://www.gianlucamilano.com/> email 
>> <mailto:gm@xxxxxxxxxxxxxxxxxx> Vcard Save Contact 
>> <http://www.companysig.com/vcards/show_vcard2.php/ELOZVI449934.vcf> 
>> View map 
>>
><http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Via+Trepiccioni%2C+39+-+80078+Pozzuoli+%28NA%29+-+ITALY+>
>
>> Twitter button <http://twitter.com/gianluca_milano>
>>
>>
>>
>>
>> Il giorno 04/apr/2014, alle ore 11:47, jeff.wang <jeff@xxxxxxxxx 
>> <mailto:jeff@xxxxxxxxx>> ha scritto:
>>
>>> Hi All,
>>>
>>> Totally agree, underscore is working well, CamelCase make no sense.
>>>
>>> ------------------
>>> Jeff Wang | jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx> | 18016291663 | 
>>> 02158980787
>>> @OpenERP_Jeff "As simple as possible, As complex as needed"
>>> <http://www.osbzr.com/>
>>> Maintainer of Open ERP china community
>>> http://www.openerp-china.org
>>>
>>>
>>> ------------------ Original ------------------
>>> *From: * "Guewen Baconnier";<guewen.baconnier@xxxxxxxxxxxxxx 
>>> <mailto:guewen.baconnier@xxxxxxxxxxxxxx>>;
>>> *Date: * Fri, Apr 4, 2014 05:25 PM
>>> *To: * "openerp-community"<openerp-community@xxxxxxxxxxxxxxxxxxx 
>>> <mailto:openerp-community@xxxxxxxxxxxxxxxxxxx>>;
>>> *Subject: * Re: [Openerp-community] CamelCase
>>>
>>> On 04/04/2014 11:05 AM, Sebastien Beau wrote:
>>> > Hi All,
>>> > I always hesitate to move or not on CamelCase for every class in 
>>> OCA module.
>>> > I prefer CamelCase but a lot of code do not use it.
>>> > And sometime not using CamelCase can introduce bug and you have to
>
>>> rename
>>> > the class in something different like here
>>> > 
>>>
>https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-change-class-name-to-avoid-error_rde/+merge/213881
>
>>>
><https://code.launchpad.net/%7Ecamptocamp/carriers-deliveries/7.0-change-class-name-to-avoid-error_rde/+merge/213881>
>>> >
>>> > Maybe it's time to move on CamelCase and update the great Nicolas
>Bessi
>>> > tools to check the class name 
>>> (https://github.com/nbessi/openerp-conventions
>>> > )?
>>> >
>>> > What do you think?
>>> >
>>>
>>>
>>> Hi,
>>>
>>> I totally support pep8 usually, but I'm also an advocate of
>consistency,
>>> and on this point actually if we want to be consistent, we have to
>use
>>> the underscore style. One of the pep8's main point is the
>consistency
>>> (in the chapter "A Foolish Consistency is the Hobgoblin of Little
>>> Minds"), stating:
>>>
>>>
>>> Some other good reasons to ignore a particular guideline:
>>> [...]
>>> 2. To be consistent with surrounding code that also breaks it (maybe
>for
>>> historic reasons) -- although this is also an opportunity to clean
>up
>>> someone else's mess (in true XP style).
>>> [...]
>>>
>>>
>>> That's not that important so I won't really argue about this choice,
>but
>>> my opinion is that we should stick with the underscores to be
>>> consistent. Or switch to CamelCase but propose the change on the
>>> official addons, which sounds like to me a wasted effort that would
>>> never be merged.
>>>
>>>
>>> - Guewen
>>>
>>> [0] http://legacy.python.org/dev/peps/pep-0008/#id9
>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openerp-community 
>>> <https://launchpad.net/%7Eopenerp-community>
>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx 
>>> <mailto:openerp-community@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~openerp-community 
>>> <https://launchpad.net/%7Eopenerp-community>
>>> More help   : https://help.launchpad.net/ListHelp
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openerp-community 
>>> <https://launchpad.net/%7Eopenerp-community>
>>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx 
>>> <mailto:openerp-community@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~openerp-community 
>>> <https://launchpad.net/%7Eopenerp-community>
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openerp-community
>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openerp-community
>> More help   : https://help.launchpad.net/ListHelp
>
>-- 
>Micronaet e-mail <http://www.micronaet.it/>
>
>
>nicola riolini
>[area tecnica]
>
>Concessionario Autorizzato Passepartout Mexal
><http://www.micronaet.it/> 
>micronaet s.r.l.
>
>sede operativa:
>via iv novembre 264
>25010 borgosatollo (bs)
>
>tel./fax +39 030 2501517
>
>Skype Status <skype:rn.micronaet?call> call me skype (utente skype: 
>rn.micronaet)
>
>ATTENZIONE: Il contenuto di questo messaggio e rivolto unicamente alle 
>persone cui è indirizzato e può contenere informazioni la cui 
>riservatezza è tutelata legalmente. Ne sono vietati la riproduzione, la
>
>diffusione e l'uso in mancanza di autorizzazione del destinatario. Se 
>l'avete ricevuto per errore vogliate eliminare il messaggio in modo 
>permanente e darcene cortesemente notizia. Analizzate sempre gli 
>allegati prima di aprirli.
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Mailing list: https://launchpad.net/~openerp-community
>Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>Unsubscribe : https://launchpad.net/~openerp-community
>More help   : https://help.launchpad.net/ListHelp

-- 
抱歉暂时无法详细说明。这份邮件是使用安装有Gmail Plus的Android移动设备发送的。

Follow ups

References