Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #387945

Re: about some potentially interesting unicode operators

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: about some potentially interesting unicode operators
Date 2024-08-28 17:04 -0700
Organization None to speak of
Message-ID <87a5gwb3dt.fsf@nosuchdomain.example.com> (permalink)
References <ad7303b3dd7422351ca7aedae5c62c44b87d29f3@i2pn2.org> <pan$49d0b$11f78ad1$d60b5799$120ef802@invalid.invalid> <87a5gwctw0.fsf@nosuchdomain.example.com> <vaob37$3l470$6@dont-email.me>

Show all headers | View raw


Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Wed, 28 Aug 2024 12:46:55 -0700, Keith Thompson wrote:
>> A problem with using non-ASCII Unicode characters as operator names is
>> that they can be difficult to type -- and the way you type them is
>> inconsistent across systems.
>
> The best way is the Compose key available on *nix systems. This is the 
> closest to a mnemonic-based system that reduces the burden on your memory.
>
> <https://wiki.wlug.org.nz/ComposeKey>

There is no "Compose" key on the keyboard I'm using to type this.
There is a key labeled "Alt Gr", but it doesn't appear to behave in
any consistent or useful way.  (I'm using a Windows laptop; "Alt Gr"
doesn't appear to do anything useful even in Windows PowerShell.)

If there's an easy way to type non-ASCII characters like '·' that
works across different systems, including all the various terminal
emulators used on Windows and Linux (as well as MacOS, but I don't
happen to use it), I'd love to know about it.  (I obtained that
'·' character by opening vim, entering the Ctrl-K . M digraph,
and copy-and-pasting into this window -- not something I'd be
willing to do every time I want to type an operator symbol.)

People who use non-English languages typically have keyboards with
accented letters and so forth.

>> There's nothing wrong with using identifiers as operator names.
>> C already does this with "sizeof" et al.
>
> Except they add to your list of reserved words.

That's not much of a problem if they're designed into the language from
the beginning.  (I'm not suggesting adding new keyword operator symbols
to C -- though C has been acquiring new keywords, including alignof
which is an operator and typeof which resembles one.)

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

about some potentially interesting unicode operators fir <fir@grunge.pl> - 2024-08-28 01:58 +0200
  Re: about some potentially interesting unicode operators Blue-Maned_Hawk <bluemanedhawk@invalid.invalid> - 2024-08-28 14:17 +0000
    Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-28 12:46 -0700
      Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-28 13:30 -0700
      Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-28 23:15 +0000
        Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-28 17:04 -0700
          Re: about some potentially interesting unicode operators Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-08-29 04:07 +0200
            Re: about some potentially interesting unicode operators Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-08-29 17:17 +0200
              Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-29 09:59 -0700
                Re: about some potentially interesting unicode operators Michael S <already5chosen@yahoo.com> - 2024-08-29 23:02 +0300
                Re: about some potentially interesting unicode operators scott@slp53.sl.home (Scott Lurndal) - 2024-08-29 20:18 +0000
                Re: about some potentially interesting unicode operators Michael S <already5chosen@yahoo.com> - 2024-08-29 23:32 +0300
                Re: about some potentially interesting unicode operators scott@slp53.sl.home (Scott Lurndal) - 2024-08-29 21:24 +0000
                Re: about some potentially interesting unicode operators Michael S <already5chosen@yahoo.com> - 2024-08-30 13:50 +0300
                Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-29 13:41 -0700
                Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-30 03:16 +0000
                Re: about some potentially interesting unicode operators Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-08-29 21:35 -0700
                Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-31 00:01 +0000
          Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-29 05:58 +0000
          Re: about some potentially interesting unicode operators David Brown <david.brown@hesbynett.no> - 2024-08-29 12:51 +0200
    Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-28 23:13 +0000
      Re: about some potentially interesting unicode operators Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-08-29 03:36 +0200
      Re: about some potentially interesting unicode operators fir <fir@grunge.pl> - 2024-08-29 10:45 +0200
  Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-28 23:11 +0000
  Re: about some potentially interesting unicode operators Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-05 07:07 +0000

csiph-web