On 3/19/08, Alexey Beshenov <al at beshenov.ru> wrote:
> There are two .mac files in share/vector, and they should be
> merged, I think. I'm working with the code now.
I'm not convinced that vector.mac and vect.mac should be merged.
These both cover mostly the same territory, but the approach
differs somewhat. I see at least these differences; I'll try to look
at this in more detail.
(1) vect.mac preserves expressions a foo b as such, and
expands them into expressions in the coordinate basis upon
request (via express); vector.mac immediately expands.
(2) vect.mac tries to apply some identities (simplifications)
that are not known to vector.mac from what I can tell.
(3) vect.mac uses the symbols "." and "~" instead of the
names "dot" and "curl" like vector.mac.
(4) vector.mac defines some operators not known to vect.mac,
namely dotdel, curlgrad, graddiv, divrurl, and christoffel.
About (1), I like preserving a foo b and expanding when I want it.
About (2), I like identities. About (3) I would rather use the names
instead of the nonalphabetic symbols; it is more obvious, and
avoids collision with other operators. In particular, vect.mac
declares "." to be commutative, which is very, very bad because
"." is already defined as noncommutative multiplication.
About (4) I don't see any value in the additional operators;
christoffel is better handled in a tensor package, and the
others are just convenience definitions.
So on the whole I like vect.mac better, except that "." and "~"
should be renamed to "dot" and "curl".
All the best,
Robert Dodier