On Fri, May 22, 2020 at 11:21 AM David Mertz <me...@gnosis.cx> wrote:


> The main point of this, is that the code is still just plain ASCII, it
> just happens to look "fancier."  It requires no plugins, and it does not
> require a JetBrains IDE or editor.  I haven't tried every editor, but I
> believe that most or all that use GUI fonts will work fine.  Not sure about
> ligatures and Linux terminal, someone can try it.
>

The ability to pretty-ify code in this way is inspiring; I'm going to have
to look into it.

There could be many other IMO more useful/helpful pretty-fication ideas out
there that could not be accomplished with unicode, or simple "replace these
symbols with another one" configurations.

Couple of examples:

1. I've often thought it would be nice if the parameter type-hints sort of
floated underneath (or maybe above? underneath makes more sense to me) the
parameter names, rather than using the colon at all. Or, perhaps using
colors to specify types - Indigo for ints, scarlet for strings, fuchsia for
floats, perhaps italics for optionals, that sort of thing.

2. Another really nice improvement, so that I could share raw,
copy-and-pasted pretty-ified code with my professional engineering
coworkers (as a set of engineering calculations), would be for the editor
to detect mathematical equations and display them that way. Like:

from scipy.integrate import quad

def f(x, i, j, a, b):
    return quad(a*x**2 + b , 0, 1, args=(a,b))

...would be displayed *automatically* (without having to muck about with
sympy), and able to be copied, as:

[image: image.png]

( latex code: $f=\int_{i}^{j} a x^2 + b \,dx$ )

*BACK ON TOPIC:*

The point of giving the examples above is not to rabbit trail, but to agree
with others who have basically said going down this particular road--
putting a lot of effort into including fancy unicode symbols as part of the
syntax-- would be a mistake.

IMO, a big reason it would be a mistake is, it doesn't bring *ENOUGH* to
the table for making things look nicer-- there is so much more that could
be done to make reading python an even more pleasurable experience beyond
using unicode symbols. And not only that, make it useful to more people
beyond the circle of those who actually even *KNOW* they are reading
"python" (as opposed to just English pseudocode describing
mathematical/algorithmic processes).

---
Ricky.

"I've never met a Kentucky man who wasn't either thinking about going home
or actually going home." - Happy Chandler
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/J7NDPLZKA4JDXVAEMCFHII556MWJP63N/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to