for -- else: what was the motivation?

Peter J. Holzer hjp-python at hjp.at
Sun Oct 16 13:01:03 EDT 2022


On 2022-10-16 12:17:39 +0200, Antoon Pardon wrote:
> Op 16/10/2022 om 00:50 schreef avi.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. Maybe even a
specialized keyboard like they had for APL (or the Sinclair ZX computers
which had special combinations for all the BASIC keywords). And if you
go this way, why not go a step further and dissociate the program from
its linear text representation? Add footnotes, different views,
hyperlinks, format mathematical expressions like formulas, etc.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-list/attachments/20221016/408ea30b/attachment.sig>


More information about the Python-list mailing list