(no title)
jepler | 1 year ago
Unicode has at least 50 sets of pairing punctuation just waiting for use...
\N{MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT} U+276c
\N{HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT} U+2770
\N{LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT} U+2772
\N{MEDIUM LEFT CURLY BRACKET ORNAMENT} U+2774
and multiple blocks of mathematical operators including ⊥ \N{UP TACK} U+22a5 ⊥
⊦ \N{ASSERTION} U+22a6 ⊦
⊧ \N{MODELS} U+22a7 ⊧
⊨ \N{TRUE} U+22a8 ⊨
⊩ \N{FORCES} U+22a9 ⊩
so you could just write the much clearer and more distinctive ⹗derive<serde::Serialize>⹘ and so on for the other new multi-punctuation sequences.Yes, by the time C++37 comes around it might be necessary to petition Unicode to add additional code points. This wouldn't be a problem, for two reasons:
First, Unicode is accustomed to adding new code points and might even be willing to pre-allocate some entire pages to the C++ committee.
Second, the existing ways to modify emoji could apply to designated mathematical modifiers as well. For instance, ∅ would denote a distinct future C++ operator symbol from ∅ or ∅ (sadly, as of 2024, hacker news can't render "pale woman "A-type" empty set" or the other empty set symbol variations I lovingly entered in this paragraph).
These sequences are highly preferable to ASCII sequences like [: because the ZWJs allow supporting editors to correctly render them as a single glyph occupying a single terminal cell and without using font ligature hacks.
Filligree|1 year ago
greenavocado|1 year ago
https://xpqz.github.io/learnapl/intro.html
zarzavat|1 year ago
You can also imbue the backslash escape sequence with the same meaning as the unicode, so that in the event that the editor didn’t make this replacement it would still mean the same thing.
layer8|1 year ago
[0] https://en.wikipedia.org/wiki/Compose_key
98469056|1 year ago
fanf2|1 year ago
https://www.unicode.org/Public/UNIDATA/BidiBrackets.txt
For extra fun, C++ < angle brackets > are, of course, not brackets.
eximius|1 year ago
omoikane|1 year ago
https://www.stroustrup.com/whitespace98.pdf
This was an April Fool's joke:
https://www.stroustrup.com/whitespace.html
I am not sure about the parent comment.