[Maxima] Complicated objects in Maxima
robert.dodier at gmail.com
Thu May 17 21:08:15 CDT 2012
On 2012-05-17, Richard Fateman <fateman at eecs.berkeley.edu> wrote:
> I think there is a potential problem, since CLOS objects will look like
Well, in a sense, there isn't a problem; non-cons atoms (e.g. arrays,
hash tables) are pretty much inert in Maxima. So if the goal is just to
construct such things and then carry them around, it seems like Maxima
would be happy enough with that.
I'd be interested to hear what Rupert has in mind when he says he wants
to use CLOS. Maybe what he wants to do is within the realm of Maxima as
it stands, maybe not.
> I think it would be safer to introduce extra stuff via
> ((group_stuff simp) <clos-object>)
> in which case the simplifier for group_stuff will know about the object,
> and the display properties can use the regular dispatch mechanism.
That would work too.
> Nuking defstruct seems like a bad idea: the substructures in defstruct
> are maxima expressions, not CLOS objects. Unless everything in
> Maxima is framed in terms of CLOS, (probably too much work !)
> I think there is a problem.
> Probably some variant of methods could be introduced to defstruct with a
> page or so of code;
> Maybe using tellsimp, it would be only a few lines.
Well, I wouldn't want to replace the existing defstruct unless we have
a working reimplementation in hand.
Incidentally, if you want to give a sketch of introducing methods into
the existing defstruct, I would be interested to hear about it.
More information about the Maxima