Am 16.07.2012 06:21, schrieb Chris Smith:
It seemed to me that things were excessively repetitive, but I think
part of the reason is that it's hard to anticipate how one expansion
may make another need to be reapplied. So as I recall, if hint foo is
being applied, along with 5 other hints, foo is applied and then all 5
others are applied; then the next of the 5 hints is applied and the
remaining 4 that haven't been applied (or is it the other 5?) are
applied again, etc... until all hints have been applied.
Hurk. That's an antipattern if I ever saw one.
For example, how can you be sure that if A leads to a reapplication of
B, that B doesn't lead to a reapplication of A?
Nevermind the quadratic blowup.
A hint should know about which other hints may influence it. Something
like "this hint must be run after that hint".
And if the runs-after relationship turns out to be cyclic, I think the
two hints should have their implementations merged. Sometimes it's
enough to merge just the tree walker or whatever is tangling the two,
and have the remaining code still separate.
Just sayin'.
--
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.