Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-3115

Clarify c++ standard for named constants

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Team:
      Architecture

      Description

      As discussed in RFC-63, it'd be good to clarify in our C++ standard (section 3.3) that the "must be all caps" rule only applies to const variables that represent constants (i.e. those that would be set using an enum or #define in C); it does not apply to variables that happen to be determined at their point of definition.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            Is it worth finding all these dangling standards tickets and trying to sort them out in one push? We seem to have a lot of them hanging around. Is there a label we can use for coding standards updates?

            Show
            tjenness Tim Jenness added a comment - Is it worth finding all these dangling standards tickets and trying to sort them out in one push? We seem to have a lot of them hanging around. Is there a label we can use for coding standards updates?
            Hide
            jsick Jonathan Sick added a comment -

            I'm using dm-dev-guide in general for developer.lsst.io content (need to document that) but we could have another for coding standards (and document that in a developer.lsst.io page about how to change coding standards)

            Show
            jsick Jonathan Sick added a comment - I'm using dm-dev-guide in general for developer.lsst.io content (need to document that) but we could have another for coding standards (and document that in a developer.lsst.io page about how to change coding standards)
            Hide
            tjenness Tim Jenness added a comment -

            Krzysztof Findeisen seems to have been using "Standards" as a label so I added that one here.

            Show
            tjenness Tim Jenness added a comment - Krzysztof Findeisen seems to have been using "Standards" as a label so I added that one here.
            Hide
            krzys Krzysztof Findeisen added a comment - - edited

            I've been guessing at appropriate labels for different types of issues, so my using one is by no means evidence that it's part of some standard. I'm not sure how many people actually use labels when searching for issues, anyway.

            Also, I believe this particular issue has been resolved: see the last paragraph of https://developer.lsst.io/coding/cpp_style_guide.html#named-constants-including-enumeration-values-must-be-all-uppercase-using-underscore-to-separate-words.

            Show
            krzys Krzysztof Findeisen added a comment - - edited I've been guessing at appropriate labels for different types of issues, so my using one is by no means evidence that it's part of some standard. I'm not sure how many people actually use labels when searching for issues, anyway. Also, I believe this particular issue has been resolved: see the last paragraph of https://developer.lsst.io/coding/cpp_style_guide.html#named-constants-including-enumeration-values-must-be-all-uppercase-using-underscore-to-separate-words .
            Hide
            tjenness Tim Jenness added a comment -

            I am confused by this ticket. The current section 3.3 is essentially the same as it was in v2 of the confluence version of the page from Sep 22, 2014. The RFC that triggered this ticket is asking for constants to be mixed case in the standard. That entire thread was then disproved by the end of the RFC and the "ADOPTED" version was just to tweak the coding standard to make it clearer. I don't think there is anything required of this ticket and I think the RFC should have been WITHDRAWN not ADOPTED. Kian-Tat Lim is that your assessment?

            Show
            tjenness Tim Jenness added a comment - I am confused by this ticket. The current section 3.3 is essentially the same as it was in v2 of the confluence version of the page from Sep 22, 2014. The RFC that triggered this ticket is asking for constants to be mixed case in the standard. That entire thread was then disproved by the end of the RFC and the "ADOPTED" version was just to tweak the coding standard to make it clearer. I don't think there is anything required of this ticket and I think the RFC should have been WITHDRAWN not ADOPTED. Kian-Tat Lim is that your assessment?

              People

              Assignee:
              ktl Kian-Tat Lim
              Reporter:
              jbecla Jacek Becla
              Watchers:
              Jacek Becla, Jonathan Sick, Krzysztof Findeisen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Jenkins

                  No builds found.