On 1/29/08, Raymond Toy (RT/EUS) <raymond.toy at ericsson.com> wrote:
> > converted pseudo datastructure in $todd_coxeter_state to using a defstruct;
> > removed unnecessary macros.
>
> It looks like $todd_coxeter_state is some variable that the user is
> allowed to see. Will changing it to a defstruct still work for users?
Well, not entirely, but it doesn;t really bother me.
Before, todd_coxeter_state was just an array, so you would
need to know which element corresponds to which named quantity.
At least the Lisp structure shows that. But there isn't a way to access
the slots of the structure except via Lisp. So that's a drawback.
It seems like it would be easy to make Maxima understand
Lisp structures. A display function could format a structure as
foo(bar=baz, mumble=blurf, ...). Slots could be accessed via
an operator, say "@", e.g. foo at bar. A Maxima defstruct function
would probably just punt to Lisp DEFSTRUCT. Maybe I'm
underestimating the work involved, but hey, that's just another
word for optimism.
FWIW
Robert