[Python-ideas] Infix functions

Haoyi Li haoyi.sg at gmail.com
Sat Feb 22 02:37:34 CET 2014


> For me that totally misses one of the main points of
> infix operators, which is that they're *concise*. There's
> little advantage in writing the above rather than

On the other hand, it does give you the other reason for infix operators,
which is that the evaluation order of the things happening flow from left
to right, rather than right-to-left or around in a spiral.




On Fri, Feb 21, 2014 at 5:16 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> Andrew Barnert wrote:
>
>> The Numeric community wanted this as a way of defining new mathematical
>> operators. ... you could solve the problem easily with infix functions:
>>
>>
>>     m `cross` n
>>     m `dot` n
>>
>
> For me that totally misses one of the main points of
> infix operators, which is that they're *concise*. There's
> little advantage in writing the above rather than
>
>    cross(m, n)
>    dot(m, n)
>
> --
> Greg
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140221/f49d5476/attachment.html>


More information about the Python-ideas mailing list