On Tue, Apr 3, 2012 at 10:01 PM, Joachim Durchholz <[email protected]> wrote:
> Am 03.04.2012 20:30, schrieb Sergiu Ivanov:
>
> This discussion has gotten somewhat circular, and no single posting has
> addressed all points and put them into perspective.
> So that's my other proposal: write up all proposals, enumerate the pros and
> cons of each, then decide.

I will expose my understanding of the situation; it is obviously
biased :-)

Current Ring class (operation-aware elements).

Pros:

  * easier manipulation of elements of a ring (a*b instead of
    R.mul(a,b));

  * is already implemented.

Cons:

  * it's somewhat cumbersome to define two different rings over the
    same set of elements;

  * it is unclear where to store the metadata about ring operations,
    because this information seems to belong to the ring, while the
    operation itself is implemented in elements;

  * more dependencies between classes: elements need information about
    the operations, the ring needs information about the operations.

Suggest Ring class (operation-unaware elements).

Pros:

  * one can define several rings over the same set of elements without
    influencing the elements themselves;

  * all concepts are fully gathered in the corresponding classes
    (Operation, Ring, Element), which minimises the number of
    dependencies between the classes: in this setup, ring depends on
    operation;

Cons:

  * unwieldy way to apply operations (R.mul(a,b) instead of a*b);

  * too verbose for cases where the information about the operation is
    not very important.

(We have all seen that both approaches can easily emulate the other
one, so I didn't list emulation on any of these lists).

Sergiu

-- 
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