[Python-ideas] π = math.pi
tjol at tjol.eu
Wed Jun 7 03:59:04 EDT 2017
On 2017-06-07 02:03, Mikhail V wrote:
> Greg Ewing wrote:
>> Steven D'Aprano wrote:
>>> There's not much, if any, benefit to writing:
>>> ∫(expression, lower_limit, upper_limit, name)
>> More generally, there's a kind of culture clash between mathematical
>> notation and programming notation. Mathematical notation tends to
>> almost exclusively use single-character names, relying on different
>> fonts and alphabets, and superscripts and subscripts, to get a large
>> enough set of identifiers. Whereas in programming we use a much
>> smaller alphabet and longer names.
> That's probably because mathematicians grown up writing
> everything with a chalk on a blackboard.
> Hands are tired after hours of writing and blackboards
> are limitited, need to erase everything and start over.
Also don't forget that mathematical formalism is *always* accompanied by
an explanation of what the symbols mean in the particular situation
(either orally by the person doing the writing, or in prose if it's in a
paper or book). Valid code, no matter how badly chosen the identifier
names, is always self-explanatory (at least to the computer); a
mathematical formula almost never is.
> I find actually symbols ≤ ≥ (inclusive comparison)
> nice. They look ok and have usage in context of writing
> But that's merely an exception in world of math symbols.
> OTOH I'm strongly against unicode.
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
More information about the Python-ideas