I wonder about changing simp.lisp to allow for structures like CLOS
objects. That is
((mplus) obj1 obj2 obj3) could work even if obj1 obj2 and obj3 are
(atomic) objects distinguishable not by their CAAR but by their types.
This might not be viable and we should think of
((mplus) ((the-type-of-obj1) obj1) ... ((the-type-of-obj2) obj2 ) ....))
thoughts?
RJF
Raymond Toy (RT/EUS) wrote:
> Stavros Macrakis wrote:
>
>> On Jan 23, 2008 9:15 PM, Rupert Swarbrick <rupert.swarbrick at lineone.net
>>
>
>
>> 3) Some of this code involves lots of copy-paste - in particular the
>> predicates like ratnump and mplusp, which just check (caar x) - I think
>> this stuff would be quite amenable to "macroization", which would mean
>> other tests on the caar could be performed trivially.
>>
>>
>> Let's not worry about microoptimizations like this, though they are
>> tempting. Ideally, we should be able to have the compiler auto-inline
>> when appropriate. (I know, this depends on things like build order.)
>>
>
> Hmm. I had assumed he meant to write a macro (or macrolet) to write the
> various predicates, not to make the various predicates into macros.
> This would make sense to me.
>
> I definitely agree with Stavros' comment about microoptimization, though.
>
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>