New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modernize check to use alternative operator representations #25569
Comments
Why? Alternative tokens are only needed for the poor developers who have difficulties entering some characters (&|^~{}[]) due to the limitations of their environment. I have never seen a recommendation to use them in normal circumstances, and I would certainly refrain from suggesting their use as a style rule. |
I don't advocating use one or other style. For example, similar decision to use alternative names was made in project I'm working on at the end of 1980s in form of C macros. Decision to use one or other style should be left for developers of particular project. Check will just help to maintain consistency. |
The question is whether there are projects/teams that are going to benefit from this proposed check. FWIW, if someone gets to implement this, it seems sensible to implement conversion in both directions (controlled by an option): to alternative tokens and to classic operators. |
*** Bug llvm/llvm-bugzilla-archive#32125 has been marked as a duplicate of this bug. *** |
Some people consider them more readable, and recommend them, for example: http://stackoverflow.com/a/1704050/1422197 No need to share the opinion, but that some people do prefer them is a fact. |
The other direction of this transformations is now proposed in https://reviews.llvm.org/D31308. |
mentioned in issue llvm/llvm-bugzilla-archive#32125 |
Finished by a084854 |
Extended Description
Will be good idea to have modernize check which could replace traditional operators representations with alternative ones: && with and, || with or, etc. See http://en.cppreference.com/w/cpp/language/operator_alternative.
The text was updated successfully, but these errors were encountered: