Problems of Symbol Congestion in Computer Languages

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Feb 18 05:26:02 EST 2011


On Thu, 17 Feb 2011 21:43:37 -0800, John Nagle wrote:

>      I've used both the "MIT Space Cadet" keyboard on a Symbolics LISP
> machine, and the Stanford SAIL keyboard. There's something to be said
> for having more mathematical symbols.

Agreed. I'd like Python to support proper mathematical symbols like ∞ for 
float('inf'), ≠ for not-equal, ≤ for greater-than-or-equal, and ≥ for 
less-than-or-equal. 

They would have to be optional, because most editors still make it 
difficult to enter such characters, and many fonts are lacking in glyphs, 
but still, now that Python supports non-ASCII encodings in source files, 
it could be done.

>      Some programs use a bigger character set.  MathCAD,
> for example, has a broader range of mathematical symbols on the input
> side than ASCII offers.  They're not decorative; MathCAD has different
> "=" symbols for assignment, algebraic equivalence, identity, and
> comparison.
>
>      I've previously mentioned that Python suffers in a few places
> from unwanted overloading.  Using "+" for concatenation of strings, then
> extending that to vectors, resulted in undesirable semantics.  "+" on
> arrays from "numpy", and on built-in vectors behave quite differently. 
> A dedicated concatenation operator would have avoided that mess.

I don't quite agree that the mess is as large as you make out, but yes, 
more operators would be useful.


-- 
Steven



More information about the Python-list mailing list