Back in 2009 or so, I and a few others ran a Google-internal April Fool's prank based on this.
We auto-generated a humongous pull request for the Chromium source code and sent it out for review by all the various source code "owners" (super reviewers) who would need to sign off.
The change used the alternate encoding for curly and square brackets, claiming the original characters were inaccessible on an Icelandic keyboard layout (which is half true, and there were quite a few of us Icelanders around) and that therefore, to be inclusive, we would like to standardize on the alternative representation.
Good fun, although I don't remember if a single one of the reviewers was fooled :)
A valid opinion for language design, but when writing real C++ code, I'd stick to the usual way of doing things.
English language keywords aren't always great for readability in my opinion. Ada's and then / or else syntax, for instance. They're the short-circuit syntax, whereas and and or give eager evaluation. [0] You can't determine that just from the syntax though, so it ends up being no less cryptic than using strange symbols the way C++ (typically) does.
"If new true friend not protected for explicit private union, break case and try using this."
I often write
if (not ...
for emphasis. The "bitand" etc. are similarly useful where the operator might otherwise be mistaken for "&&" or, particularly, "||".
The only one that is an unfortunate choice is "compl", which just looks strange. When I feel a need to call attention to use of "~", I define a lambda "bitwise_not(bool)". But rarely.
I've never seen anyone use these since they appeared in the spec decades ago. They're as pointless as trigraphs, which I've never seen in the wild either.
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.
[+] [-] joisig|4 years ago|reply
We auto-generated a humongous pull request for the Chromium source code and sent it out for review by all the various source code "owners" (super reviewers) who would need to sign off.
The change used the alternate encoding for curly and square brackets, claiming the original characters were inaccessible on an Icelandic keyboard layout (which is half true, and there were quite a few of us Icelanders around) and that therefore, to be inclusive, we would like to standardize on the alternative representation.
Good fun, although I don't remember if a single one of the reviewers was fooled :)
[+] [-] wmu|4 years ago|reply
[+] [-] MaxBarraclough|4 years ago|reply
English language keywords aren't always great for readability in my opinion. Ada's and then / or else syntax, for instance. They're the short-circuit syntax, whereas and and or give eager evaluation. [0] You can't determine that just from the syntax though, so it ends up being no less cryptic than using strange symbols the way C++ (typically) does.
[0] https://en.wikibooks.org/wiki/Ada_Programming/Operators#Shor...
[+] [-] usefulcat|4 years ago|reply
[+] [-] bombela|4 years ago|reply
And I find its harder to typo and misread it:
`a && b || c` vs `a & b | c`
`a and b or c` vs `a & b | c`
[+] [-] ncmncm|4 years ago|reply
"If new true friend not protected for explicit private union, break case and try using this."
I often write
for emphasis. The "bitand" etc. are similarly useful where the operator might otherwise be mistaken for "&&" or, particularly, "||".The only one that is an unfortunate choice is "compl", which just looks strange. When I feel a need to call attention to use of "~", I define a lambda "bitwise_not(bool)". But rarely.
[+] [-] thestoicattack|4 years ago|reply
https://en.cppreference.com/w/cpp/utility/functional/bit_not
[+] [-] WalterBright|4 years ago|reply
[+] [-] tyingq|4 years ago|reply
[+] [-] nikhilsimha|4 years ago|reply
[+] [-] WalterBright|4 years ago|reply
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] signa11|4 years ago|reply
[+] [-] tasty_freeze|4 years ago|reply
[+] [-] TobyBrull|4 years ago|reply
[+] [-] tirrex|4 years ago|reply
[+] [-] WalterBright|4 years ago|reply
[+] [-] detaro|4 years ago|reply
Its explained in the first two sentences of the page.
[+] [-] slaymaker1907|4 years ago|reply