Some people on this list might be interested in this. Some folks are
giving another shot at writing a PEP to add a new operator to Python
for matrix multiplication. The discussion is at
https://github.com/numpy/numpy/pull/4351.
Hello.
Can you give a little example showing how to define an infix operator in Haskell ?
Christophe
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/21d80555-342e-4ae1-b7f0-9db077bc37f6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I'm not sure but it seems that Ruby syntax can be a solution. Here is an example.
class matrix():
...
def @(self, mat):
...
Instead of the method __add__(self, ...) , we could use the method +(self, ...).
The only change will be to manage dynamical infix lexer for the Python parser.
Christophe BAL
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6Lq2v3sQb_KAoT%2BCWetfaSh4LPGOM0J%2BpXpLhHtb8XChA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6L8pu7ejjqkWUbA%2By%2BjUkg01PrdyjTbHF4xVaRa1McyoA%40mail.gmail.com.
> Because it turn python to be a DSL for numeric computations.
How is that a bad thing? Python is already used heavily for numeric
computations.