Discussion: new operators for numerical computation
Paul Magwene
paul.magwene at yale.edu
Thu Jul 20 11:49:01 EDT 2000
Konrad Hinsen wrote:
> If I remember correctly, the APL symbol set is somewhere in Unicode.
> I agree that this proposal is not a realistic one for the immediate
> future, but I still like it ;-)
>
> > (1) Use . or @
>
> For purely esthetic reasons, I wouldn't want to have @ in operators.
> The dot is fine but there are conflicts with floating point constants.
>
> But there are other alternatives. How about operators in parentheses?
> a (*) b looks fine to me, and it is currently illegal so it can't cause
> compatibility problems. I'd even claim that it somewhat *looks* like
> a matrix operation.
>
Of all the proposals so far, I find Konrad's suggestion to be the most
appealing.
I could definitely get used to the following:
A(*)B
A(/)B
A(+.*)B
...etc
Please keep * for elementwise multiplication like in NumPy. There is
already a large installed user/codebase which uses it as such.
I personally find A at B very hard to parse visually. @ justs seems to just
smack of that other P language. ;-)
For an example where the symbol @ is used extensively, check out the
document markup language Lout. I enjoy using Lout, but marked-up files
quickly become very unreadable.
Paul Magwene
paul.magwene at yale.edu
More information about the Python-list
mailing list