> For the first one, it's a tiny bit more efficient, and it's indeed
> a special case and deserve a  special check.

Actually, looking what normal code does with empty list is
good check for correctness.  Since we do not need to do
anything special it is good to make it explicit by
omiting special case.  Yes, having special case is
more efficient but it is unlikely to matter.

 
> For the second one, other functions' signature are written
> twice, it's inconsistent to just remove for findQRelation.

Well, old code frequently used definitions without types
so early signature was necessary and meaningful.  But
definitions which contain types of arguments are more
readable.  If function is used before definition than
we still need early signature.  However, as this example
shows if there are no use before definition then
early signature is essentially ignored.  Conseqently
it looses its meaning: it may be wrong and compiler
will not tell us.  In other words it is place where
latent bugs may hide.

Concerning consistency: there are many cases of signatures
written twice, but most of them are neccessary.  AFAICS
compiler tolerates wrong signature only when it is useless
and this is first case when I see compiler tolerating
wrong signature.  When I change code compiler frequently
reports mismatches in signatures.  Given that I think
useless signatures are relatively rare.  So for consistency
we should rather completely remove them.

-- 
                              Waldek Hebisch

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to