for -- else: what was the motivation?

Antoon Pardon antoon.pardon at vub.be
Sun Oct 16 13:52:47 EDT 2022



Op 16/10/2022 om 19:01 schreef Peter J. Holzer:
> On 2022-10-16 12:17:39 +0200, Antoon Pardon wrote:
>> Op 16/10/2022 om 00:50 schreefavi.e.gross at gmail.com:
>>> That might not easily solve this problem. But I wonder if reserving
>>> some kind of prefix might help, so anything like extension.0nNoBreak
>>> could be added to a loop as a final clause and be treated as a
>>> non-key keyword of sorts.
>> My idea would be to reserve different unicode blocks for the keywords and
>> the identifiers. e.g. We could reserve the mathematical alphanumeric block
>> for keywords and all other letters and numbers for identifiers. Doing so
>> would allow extenting the keywords without breaking programs that already
>> use that combination as an identifier.
> Or you could go back to the old Algol idea of underlining keywords.
>
> Both have the same problem, though: They make editing with an ordinary
> text editor pretty much impossible. You need a language-aware IDE which
> makes entering these characters or markups simple.

That is not true with my idea. The editor would just need to be able
to work with unicode characters. Vim can work with 𝐝𝐞𝐟 just as it can
with def.

In vim I can also define abbreviations so that whenever I type ^Bd vim
wil insert 𝐝𝐞𝐟 for me.

It may be useful to have an alternative keyboard definition ready to
easily insert these characters into the editor but ordinary editors
should already be able to treat these characters as any other unicode
character.

-- 
Antoon Pardon


More information about the Python-list mailing list