On 12/5/18 8:02 PM, Ralf Hemmecke wrote:
> Other issues...
>
> I think there are some potential bugs in the the default package that
> comes with the category.
>
> Under convention a function with a name ending in ! modifies its
> argument(s) destructively.
>
> In FiniteSetAggregate I see...
>
>    difference(s : %, t : %) ==
>        m := copy s
>        for x in parts t repeat remove!(x, m)
>        m
>
> and find this lonely "remove!" troublesome. Shouldn't it rather be
>
>    m := remove!(x, m)
>
> http://fricas.github.io/api/FiniteSetAggregate
>
http://fricas.github.io/api/DictionaryOperations.html#l-dictionary-operations-remove
>
> Ralf
>

In theory we should always use "m := remove!(x, m)" over
"remove!(x, m)", but in reality, some Domain can have the
property that these 2 expressions are equal, and in our case,
Set and CharacterClass have this property.  But we should
not assume this property in category.  If someone implement
a set domain by List, then this default implementation from
category will return wrong result.

So I agree that you should make this change.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
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