ethz-asl / programming_guidelines

This repository contains style-guides, discussions, eclipse/emacs auto-formatter for commonly used programming languages
139 stars 38 forks source link

Named constants (including enumeration values) #1

Closed simonlynen closed 11 years ago

simonlynen commented 11 years ago

Alternatives:

  1. Named constants (including enumeration values) must be all uppercase using underscore to separate words. DAYS_IN_A_WEEK
  2. Mixed case starting with upper case: DaysInAWeek (ROS)
  3. Use a k followed by mixed case: kDaysInAWeek. (Google)
stephanemagnenat commented 11 years ago

I vote for one, as it is the most used convention as far as I have seen.

markusachtelik commented 11 years ago

I'd vote for 1) as well. 3) seems weird …

simonlynen commented 11 years ago

as Hannes is probably guessing right, the "k" might be German influenced... how bad :D

furgalep commented 11 years ago

Sounds good.