Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Consider making different naming rules for variables and types #24

Open
hkim15 opened this issue Jul 8, 2019 · 2 comments
Open

Consider making different naming rules for variables and types #24

hkim15 opened this issue Jul 8, 2019 · 2 comments

Comments

@hkim15
Copy link
Contributor

hkim15 commented Jul 8, 2019

In the current Hafnium code, it is difficult to tell if an identifier is a type or a variable. It might be useful to create naming rules to differentiate them.

@jeehoonkang
Copy link
Contributor

I disagree with you on the idea of such naming convention. The primary reason is that types and variables are easily distinguishable by modern IDEs. That's also one of the reasons why the "hungarian notation" is unused in most modern development projects.

@hkim15
Copy link
Contributor Author

hkim15 commented Jul 20, 2019

I am also oppose to something like "hungarian notation". On the other hand, I am in more favor of using one of the following variations to distinguish different classes of identifiers:

ALL_UPPERCASES
all_lowercases
MixedCasesThatBeginWithUppercase
mixedCasesThatBeginWithLowercase

For instance, I favor using ALL_UPPERCASES for constants and MixedCasesThatBeginWithUppercase for types, member functions/variables. For local variables, I prefer using all_lowercases or mixedCasesThatBeginsWithLowercase.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants