Martin Rubey wrote:
>
> Waldek Hebisch <[EMAIL PROTECTED]> writes:
>
> > I wonder why you think that is?(f, sy) is the one to save?
>
> actually, just because it's the one that's documented in BOP.
>
> > Presonally, this version was a bit misleadig for me (before I got used to
> > it), not the others. I would say that hasName?(f, sy) would be much
> > clearer.
>
> I think that name f = sy is much clearer. That's why I proposed to eliminate
> is?.
>
My problem with "name f = sy" is that such form clearly says that we
want to check name of operator. However, in algebra we really do
not care about name, we care about meaning. The is? form is
makes clear this aspect. Now, implementation of is? is confused,
probably some of original authors assumed that equal name means
equal meaning, but exp^log(x) example shows that this is not the
case.
I think that we definitly should do the easy part: remove isExpt(x, sy)
and use only isExpt(x, op) or isExpt(x) (and undo extra checks for
number of arguments).
Concerning is?(op, sym): I think it would be good to clear current
mess. But to do that we would need to analyze uses of is?(op, sym)
to find out if the intent was is?(op, op) or if the code wants some
looser equivalence relation on operators. It is possible that
all uses of is?(op, sym) should be is?(op, op), but that
this requiers a bit more thought.
One more remark: there is also question of user code. If users
keep names distinct, then is?(op, sym) is actually OK. So, the
question is if we should remove is?(op, sym) entirely, forcing
users to choose between "name op = sym" (worse IMHO) or
"is?(op, operator(sym, arity))" (more effort).
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" 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/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---