[alexandria-devel] Some number patches

Nikodemus Siivola nikodemus at random-state.net
Wed Apr 25 12:44:58 UTC 2012


On 25 April 2012 06:03, Robert Smith <quad at symbo1ics.com> wrote:

> I've created a patch that adds MULF and DIVF, which do what you might
> expect (modify macros for * and /). I also added some numerical
> predicates that I myself like, as well as others: POSITIVEP,
> NEGATIVEP, NON-POSITIVE-P, NON-NEGATIVE-P, NON-ZERO-P. As you might
> notice, they sound especially familiar to those who read mathematics
> literature.

(Didn't check your code yet, this is just based on the names.)

DIVF and MULF I think I'm fine with.

Though I share most of Tamas' reservations re. POSITIVEP and
NEGATIVEP, but acknowledge that they form a good symmetry with the
NON-*-P versions -- so I think I'm fine with those going in as well.
If they go in, they should be synonyms for PLUSP and MINUSP, though --
not subtly different.

As for NON-*-P ... I kind of like them. While COMPLEMENT works, I'm
pretty glad we have REMOVE-IF-NOT, instead of being forced to write

  (remove-if (complement #'foop) ...)

Similarly, I think (NON-NEGATIVE-P X) is cleaner to read than (NOT
(MINUSP X)) -- though the cognitive cost difference it pretty trivial.

Thinking about them.

> Also, would it be possible for me to have push permissions?

Not for the asking, no.

If you provide several high quality patches and display the kind of
judgement we're looking for, yes, eventually.

Cheers,

 -- Nikodemus




More information about the alexandria-devel mailing list