On Thu, Jan 9, 2020 at 7:55 AM Frank Terbeck <[email protected]> wrote:
Linus Björnstam wrote: > > Your bitwise-nand etc takes more arguments than they have to. They are > > 2-argument procedures according to the spec, which gives you better > performance > > than the apply-dance you are doing now. Maybe have a bitwise-nand and a > > bitwise-nand*? > > Yeah, I did that on purpose. The performance argument is probably valid, > though. However, I don't want to extend the API. Maybe I'll put in a > case-lambda there. > The reason bitwise-nand and friends have only two arguments (and this comes from Olin's original) is that they aren't associative: it's ambiguous whether (bitwise-nand a b c) means (bitwise-nand (bitwise-nand a b) c) or (bitwise-nand a (bitwise-nand b c)), and these are *not* equivalent. Rather than choosing one of these arbitrarily, users have to say what they mean. John Cowan http://vrici.lojban.org/~cowan [email protected] Any sufficiently-complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp. --Greenspun's Tenth Rule of Programming (rules 1-9 are unknown)
