On Tue, Feb 03, 2026 at 06:11:52PM +0100, Grégory Vanuxem wrote:
> Hello,
>
> I am wondering why I have this behavior, see the interpreter session below.
>
> I have a domain JLObjNamedTuple to operate on Julia NamedTuple,
> something like a FriCAS Record. It contains two constructors with
> declaration signature:
> jntuple : String -> %
> jntuple : Tuple(Any) -> %
>
> For comparaison, below, 'jobject(String)' has the same
> declaration/definition than the first jntuple above:
> jobject(str : String) == jlref str
>
> My problem is the function selection of jntuple(String). Here is an
> interpreter session:
In some places interpreter recursively looks for all possiblities.
But in many places once interpreter made a choice it sticks to it
even if there is better/working possiblity. I suspect that
what you see is caused by such premature commitment.
Let ma add that design of algebra interface is affected by
interpreter, current signatures a choosen to get reasonable
behaviour from interpeter inference. For example, it would
be natural to make more general matrix categories and such
change seem to work fine for Spad. But interpreter has special
case for current signatures, which doen not work for more
general ones. In a bit different spirit, we do not export
operation like 'nullSpace' over say PID-s, because current
signatures force coercion to field of fractions, which is
what normal users want.
So, plan your signatures having in mind that _not_ exporting
some signature or deliberatly using a differnt name can
guide interpreter to good choice.
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
fricas-devel...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dYd1yCx3LqU%2BgK3S_Ct9w1qNqYYfzMmaYC5CtF3rBTnOA%40mail.gmail.com.
--
Waldek Hebisch