>
> Personally, I think it all boils down to the discussion from
> https://github.com/sympy/sympy/wiki/canonicalization.  If we want to
> say two Exprs can be put together in an Add, for example, then it
> matters if we let Add let its args define their own behavior on it or
> not.
>

I dislike the separation between Expr and Basic. It does not permit me
to do something like (1+square)**flower. It is true that such
expression may be nonsensical in most cases, but if the user wants
them, why stop him. I think this is part of why now we have MatExpr,
QuantumExpr and so on.

Moreover removing the distinction will make the class tree much easier
to understand. I am a good example of a new user trying to understand
the core (at least I think so but I am biased ;) and having Atom used
only by AtomExpr, Application used only by Function, and Basic that is
most often used by Expr (the last one is not exclusive) seems strange.

There is the argument that "in theory some class might use Atom and
not AtomExpr". In practice most of the author did not do that (either
because they were unaware or because there was no actual need).

I need to create a Point in manifold class. I think to use AtomExpr.
The same goes for Vector in vector space. (which actually was already
done by the quantum module)
MatrixSymbol subclasses Symbol, not Atom.

Finally mathematica and lisp permit you to create arbitrary
expressions like
(1+member_of_permutation_set)**a_table_containing_plots. This freedom
is used for example in xAct. It permits the use of the simplify
function on non-scalar expressions instead of creating a new
simplify-tensor.

Still, the most important argument for merging these classes it that
it simplifies substantially the class tree without the loss of
functionality. If it turns out to be a bad decision, it can be
reverted easily, provided that when merging them comments about
what-comes-from-where are added.

Are you guys interested in experimenting with this.

My usual disclaimer that I might not know what I am talking about
applies strongly here.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to