[ 
https://issues.apache.org/jira/browse/MESOS-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163710#comment-14163710
 ] 

Dominic Hamon commented on MESOS-1046:
--------------------------------------

We can replace the include guards with the guidance from 
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#The__define_Guard.

Continuations are a more intrusive change. The underscore scheme works really 
well for indicating continuations, but we do use two or more continuations in 
places. I'm loathe to suggest numbering ({{launch}}, {{launch1}}, {{launch2}}) 
as i find that difficult to parse. perhaps breaking up the underscores with a 
character like 'c' for continuation: {{launch}}, {{c_launch}}, {{c_c_launch}}?



> Use of leading underscore in names (global symbols and defines)
> ---------------------------------------------------------------
>
>                 Key: MESOS-1046
>                 URL: https://issues.apache.org/jira/browse/MESOS-1046
>             Project: Mesos
>          Issue Type: Improvement
>          Components: technical debt
>    Affects Versions: 0.19.0
>            Reporter: Till Toenshoff
>            Priority: Minor
>              Labels: c, c++, libprocess, mesos, standards, stout
>
> Even though this appears to be a very common standard breach, I thought it 
> would still be nice to play entirely by the rules.
> If I get things right, then according to the 1999 C standard as well as the 
> 2003 C++ standard, using leading underscores followed by a capital letter and 
> maybe even more importantly, using double-underscores are reserved for the 
> implementation of those standards. This appears to apply for both, global 
> namespace symbols as well as defines. 
> We are currently using double-underscores in our include-guards and it may be 
> wise to fix that and any other collision with the standards in relation with 
> the use of underscores.
> A nice compilation of the related standard quotes can be found at 
> http://stackoverflow.com/a/228797/91282



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to