[Python-ideas] Function composition (was no subject)
Stephen J. Turnbull
stephen at xemacs.org
Sun May 10 19:52:37 CEST 2015
Gregory Salvan writes:
> Nobody convinced by arrow operator ?
>
> like: arg -> spam -> eggs -> cheese
> or cheese <- eggs <- spam <- arg
Yuck. There are living languages (R) that use an arrow as an
assignment operator, and others (or perhaps you consider C a zombie
language <wink/>) that uses one as a member operator. I would prefer
the C++ pipe operators, ie, << and >>.
But that's just bikeshedding a moot point; I doubt most people would
be favorable to introducing more operator symbols for this purpose,
and I personally would be opposed. If functools was more popular and
its users were screaming for operators the way the numerical folk
screamed for a matrix multiplication operator, I'd be more sympathetic.
But they're not screaming that I can hear.
To give an idea of how difficult it is to get an operator added, it
took at least a decade to get the matrix multiplication operator added
after it was first proposed, and two of the key steps were first the
introduction of unary "@" for decorator application (another case that
screamed for a new operator), and then the proponents dropping the
"@@" operator from their proposal.
More information about the Python-ideas
mailing list