[Python-ideas] Why operators are useful
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Mar 16 04:39:05 EDT 2019
Rémi Lapeyre wrote:
> I think this omit a very important property of
> mathematic equations thought, maths is a very strongly typed language
> which can be a significant improvement for readability.
Python is very strongly typed too, so I don't really see how
maths is different.
> For example, a
> mathematician working within the space of linear maps over a vector
> space will easily recognize the meaning of every symbol in:
>
> f(a * x + y) = a * f(x) + f(y)
Yes, but he has to remember what types are associated with
the variables -- nothing at their point of use indicates that.
Likewise, the reader of a Python program has to remember what
type of object each name is expected to be bound to. If he
can remember that, he will know what all the operators do.
--
Greg
More information about the Python-ideas
mailing list