Waldek,
On Wed, Aug 27, 2008 at 3:37 PM, you wrote:
>
> I have now a patch which removes attributes and replaces them
> by empty categories.
I support this change.
> Some remarks:
> - commutative("*") is strange beast, to avoid problems with
> meaning and type of the argument I replaced it by
> CommutativeStar category. Once we have a solution to Monoid
> problem we can change this, by currently having parameter to
> commutative looks like useless complication
I disagree. I think defining commutative this way makes very good
sense:
Commutative(op:Symbol):Category == with op:(%,%)->%
then any place that attribute commutative("*") is used we should just remove the
*:(%,%)->%
export and replace the attribute with the category Commutative("*").
Also as I noted in another thread, passing a parameter like this is
one way to solve the "Monoid problem".
> - when I just modified algebra there were some regressions --
> for example interpreter thought that some functions defined in
> HomeogeneousAggregate are defined in shallowlyMutable
> category. To avoid them I had to hard-code knowledge about
> categories which replaced attributes in the interpreter.
This does not seem desirable to me. I do not understand why the
interpreter has problems with these new categories. It seems to me
that the semantics of attributes are (or at least should be) exactly
the same as for categories. If this hard-coded knowledge is necessary
to work around some bug, then perhaps it would be better to fix the
bug. No?
> - I tried to add some error checking in the interpreter to
> reject old style use of attributes, but I am not sure if
> the checks are complete -- I had to keep part of attribute
> machinery in the compiler because currently conditional
> categories are treated as attributes by the parser and only
> later recognized as categories.
>
That's probably ok for now.
> Any comments -- I plan to commit this patch soon.
I like the idea of "cleaning-up" the Spad language this way! Thanks
for you work on this issue.
Regards,
Bill Page.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---