Liste des Groupes | Revenir à cl c |
Lawrence D'Oliveiro <ldo@nz.invalid> writes:The Alt-Gr key works differently depending on the keyboard layout. Typically you need to choose some kind of "international" layout to get a distinction between Alt-Gr and Alt. Then you have easy access to a fair number of additional characters, even ones that are not required for the language you use. The disadvantage is that some keys become "dead" keys, especially for accents and other diacriticals. So if you pick "international" versions of the US or UK keyboard layouts, rather than the standard ones, you get some Alt-Gr characters.On Wed, 28 Aug 2024 12:46:55 -0700, Keith Thompson wrote:There is no "Compose" key on the keyboard I'm using to type this.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 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 '·' thatToo many reserved words in a language quickly becomes a problem. It can get in the way of picking sensible identifiers for your own usage, and because a real issue when you want to add more in the next language version.
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.
That's not much of a problem if they're designed into the language fromThere'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.
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.)
Les messages affichés proviennent d'usenet.