News for hackers. Stuff that matters.
Re:C++ Alternative Operator Representations by tirrex on Friday April 23, 2021 @02:34PM (#26917688)
What is the purpose of this? Does anybody find these more readable?
Re:C++ Alternative Operator Representations by WalterBright on Friday April 23, 2021 @05:09PM (#26919234)
It's like Van Halen and the brown M&Ms thing. It determines if the author of a C++ lexer, syntax highlighter, etc., read the Standard. Try splitting a digraph with \ and a newline.
Re:C++ Alternative Operator Representations by detaro on Friday April 23, 2021 @02:36PM (#26917706)
> What is the purpose of this?

Its explained in the first two sentences of the page.

Re:C++ Alternative Operator Representations by slaymaker1907 on Friday April 23, 2021 @07:29PM (#26920489)
I like the use of "not" because it stands out more clearly than "!". "if (not (x and y))" seems more readable to me than "if (! (x && y))".
Re:C++ Alternative Operator Representations by tirrex on Friday April 23, 2021 @07:49PM (#26920640)
I agree, “!” is something easy to miss. I prefer “!=“ mostly for this reason.

I am just surprised I’ve never seen this in any code base before.