Why not use a more consistent notation like add(x, y) instead of x + y when we know addition is a function and all other functions (usually) follow the f(x, y) notation? Because math is old. No, it's because infix notation is *more readable* than function notation when formulas become complex.
I think addition was a bad example of inconsistent notation, but I did hedge that statement with: That's not the only reason, of course, but it is a pretty big reason. I don't disagree that infix notation is more readable because humans have trouble balancing brackets visually. However, I maintain that readability doesn't seem to be the main concern of math notation. The main concern of math notation seems to be limiting ink or chalk use at the expense of nearly all else (especially readability). Why is exponentiation or log not infixed? Why so many different ways to represent division or differentiation? It has persisted because it works, not because mathematicians are stuck in
their ways.
Something persisting because it works does not imply any sort of optimality. A good way to test this is to find a paper with heavy use of esoteric math notation and translate that notation to code. I think you'll find the code more accessible. I think you'll find that even though it takes up significantly more characters, it reads much quicker than a dense array of symbols. I spent a good few weeks trying to make sense of the rather short book "Universal Artificial Intelligence" by Marcus Hutter because he relies so heavily on symbolic notation. Now that I grasp it, I could explain it much more clearly in much less time to someone with much less background than I had going in to the book. On Thu, Nov 7, 2019 at 1:44 AM Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
Abe Dillon wrote:
Why not use a more consistent notation like add(x, y) instead of x + y when we know addition is a function and all other functions (usually) follow the f(x, y) notation? Because math is old.
No, it's because infix notation is *more readable* than function notation when formulas become complex. It has persisted because it works, not because mathematicians are stuck in their ways.
Having said that, it's relatively rare that mathematicians make up entirely new symbols -- they're more likely to repurpose existing ones. E.g. "+" is used for addition-like operations on a very wide variety of things -- numbers, vectors, matrices, tensors, quantum states, etc. etc. Mathematics is quite Python-like in that way.
-- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@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/FUHAOC... Code of Conduct: http://python.org/psf/codeofconduct/