On Thu, 24 Jan 2008 12:20:22 -0500
"Raymond Toy (RT/EUS)" <raymond.toy at ericsson.com> 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.
Yes, that is what I meant. It was just an example of where I?think
large hunks of identical code could be made slightly more transparent -
after all, a macro called say "caar-is-p" or a better name would apply
to quite a few of them.
This was only meant as an example though - I?agree there are much more
pressing issues, including bugs to sort out.
Rupert