4 ms·
> I found myself spending time wondering "what characters is this made of?" Funny sidenote: I've got my Emacs configured to show any non-ASCII char in source c
by TacticalCoder 5y ago
> I found myself spending time wondering "what characters is this made of?"
Funny sidenote: I've got my Emacs configured to show any non-ASCII char in source code in bold pink on a pure black background (including zero-width spacing chars). That way the non-ASCII chars do really standout and I rarely wonder "which char is this?".
I don't forbid them: they do just really stand out.
Most of the time the only Unicode chars in source file are anyways the copyright symbol and some chars in author's name (in comment). Sometimes in strings.
- mananaysiempre 5y agoThis works as long as those characters truly are a rarity and will probably become unbearable otherwise. For example, try opening some Agda code, or reading firmware or BSP code with Chinese comments (hello, ST Microelectronics), or some other ancient or internal code with non-Latin native-language comments (Japanese is pretty common, my native Russian can also be found in the wild occasionally). I’ve heard somewhere that Java’s support for Unicode identifiers was originally motivated not only by “oh shiny” (although I expect there’s a measure of that, too), but also by allowing the Japanese to write their code how they wanted it, and apparently did indeed help with capturing mindshare. Though, to be fair, I’ve never actually seen Java code with Japanese identifiers.
- a_e_k 5y agoInteresting. I just check for non-ascii on-demand with a tiny macro around occur (because I can never quite remember the regexp syntax for named character classes): (defun find-non-ascii () "Find and show all of the non-ascii characters." (interactive) (occur "[[:nonascii:]]"))