Adding new math operators

Neil Hodgson neilh at scintilla.org
Fri Aug 4 02:34:25 EDT 2000


> What if there were no new operators, no new syntax, but
> instead a new module that used excessive cleverness to
> translate Python expressions into MathML, which was
> then displayed in emacs/Idle/PythonWin as Real Math?
>
> So you'd still enter expressions in function notation:
>     dot(cross(v1,v2),solve(thingy,frob))
>
> But when reading the code, you'd see a nice clean expression,
> with parentheses sized and balanced and oh-so-easy to read.

   It would be fairly easy in PythonWin to take the proposed infix operators
such as ~*, ~+ and produce more distinctive glyphs, either using standard
glyphs from the Unicode character set or some newly defined ones. They could
also be treated as single characters from the point of view of editing.
Nicely sized braces with inner braces being smaller than outer ones is
possible but more difficult.

   Users of this will still have to know how to deal with the standard ASCII
representation. Is the prettiness worth having two representations?

   Neil






More information about the Python-list mailing list