Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
barbs
· 3y ago · 0 comments
What alternative would you suggest?
Comments
[–]
avgcorrection
3y ago
Writing in a normal way in snake case or camel case or whatever the convention is.
[–]
yakubin
3y ago
In C++ I do it Google style:
static constexpr int kConstantName = 42;
[–]
_moof
3y ago
This is the old Mac style too. Might just be my upbringing but I prefer it.
[–]
avgcorrection
3y ago
What's the point of the `k` prefix?
[–]
smithza
3y ago
k for konstant
[–]
xigoi
3y ago
Just use the same style as for variables. What's the point of the distinction? Maybe you'll want to change a constant into a variable later.