Constant naming convention
kbullock+mercurial at ringworld.org
Tue Dec 13 12:03:47 EST 2016
> On Dec 13, 2016, at 10:29, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> On 12/12/2016 04:12 PM, Augie Fackler wrote:
>> Can we just align with prevailing Python style here and start using
>> all caps for constants? This comes up roughly monthly, and I think
>> it'd be a good clarity win.
> As much as there is many thing in our current coding still, it is our current coding style and our codebase is consistent with it for the very vast majority. As stated previously, my current stance is that we should refrain for changing this category for policy for about one year after Matt stepped away. So I would like us to keep to lower case constants for now.
> At the 4.4 sprint, I'll be very happy to have a large discussion about our style (and very happy to us CAPS for constant at that time).
Ehh? I don't recall us ever having discussed a one-year moratorium on style changes, and I don't see a reason we would need to wait until the sprint to decide a matter of style.
That being said, the prevailing (though by no means universal) style does seem to be lowercase for constants. If we were to change those to all-caps, it would mean a fair amount of churn. If we were starting from scratch I'd say we should unequivocally use all-caps; since that's not the case I'm about -0 on the idea.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel