3 ms·
As someone who strongly regrets the fact that most programming languages arbitrarily restrict valid identifiers to Unicode "word characters" (ID_START and ID_CO
by aragonite 3y ago
As someone who strongly regrets the fact that most programming languages arbitrarily restrict valid identifiers to Unicode "word characters" (ID_START and ID_CONTINUE), I was pleasantly surprised to discover the other day that, like Racket, Clojure, Julia and Swift, you can use emojis and pretty much any Unicode symbols in C++ identifiers!
- scatters 3y agoWe walked that back, sorry. http://eel.is/c++draft/diff.cpp20.lex#1 http://eel.is/c++draft/diff.cpp20.lex#1 Change: Previously valid identifiers containing characters not present in UAX #44 properties XID_Start or XID_Continue, or not in Normalization Form C, are now rejected. Rationale: Prevent confusing characters in identifiers. Requiring normalization of names ensures consistent linker behavior. Effect on original feature: Some identifiers are no longer well-formed.
- aragonite 3y agoArrg!! You can't rely on anyone these days. Oh well, at least these symbol-like characters which I've collected for use in Javascript (which has almost the same rules) should still work! ⴵ ⵛ ꘜ ⵣ ꕤ ꖜ ꘖ ꧮ ⴲ ꘖ Ⰴ Ⰺ