Am 07.10.2013 20:07, schrieb F. B.:
I just had a look at the Julia project http://julialang.org/
Have a look at how they manage operator overloading:
I just did and shuddered.
Unrestrained multple dispatch runs into modularity issues. It's one of
those mistakes that language designers make over and over again, because
the base idea seems to simple and the use cases one can think of are so
straightforward, but they almost never consider the case what happens
when two independent developers have their work merged by a third.
That is a great idea, it would keep code clear and readable, and avoid the
need of all those *if isinstance( ) ... elif isinstance( )*
There are better and more general ways to avoid that.
Unfortunately, neither Julia's approach nor the ones typically employed
in FPLs are available in Python.
By the way, the aim of Julia is to be both an interpreted language and a
fast compiled language, with speed of execution near to those of C. At the
same time they want to keep perfect interaction with both Python and C...
Sounds like they're too ambitious to succeed.
So, why not try rewriting Sympy Core in Julia?
Now you're just talking crazy ;-P
> It would keep the
programming language simple, maybe even simpler than in Python,
Unlikely. Every language has its quirks.
Joel isn't right in everything he writes, but the points he raises are
usually well worth considering.
He covered rewrites already:
http://www.joelonsoftware.com/articles/fog0000000069.html
> and at the
same time allow perfect interaction with both Python and C, and reach the
performance of C.
I doubt that you can have both easy interaction with dynamic languages
and raw performance. To the very least, you'll have to keep the number
of inter-language calls down, and that would impose design restrictions
on Sympy's code. Sympy already has a lot of restrictions to observe, I
doubt that that's going to be easy.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.