[Feature Request] Keywords for symbol operators
Danilo
codedan at aol.com
Sun Feb 25 23:40:19 UTC 2024
On Sunday, 25 February 2024 at 15:24:40 UTC, Guillaume Piolat
wrote:
> Would love to have that. C++ has not, and, and or for a while
> as keywords.
> Makes negations more readable!
Exactly!
[Just discovered C++ has keywords 'and'/'or'/'not'
etc.](https://www.reddit.com/r/cpp/comments/mw0khm/just_discovered_c_has_keywords_andornot_etc/?rdt=63852)
from comments:
> I've been using `and`, `or` and `not` for years because I feel
> that it makes the code more readable.
> Hundred percent. It’s so much more readable to write “not”
> before a variable in an if statement... I think it’s annoyingly
> easy to read over the ! in (!longvariablename).
[Modern C++ : `and`, `or` and `not` as Boolean
Operators](https://dev.to/delta456/modern-c-and-or-and-not-as-boolean-operators-2jgf)
Personally I read about it in C++20/23 books round about 2 years
ago for updating my C++98 knowledge, and then just started using
it. Takes 1-2 days for getting used to it. ;)
More information about the Digitalmars-d
mailing list