Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!snorkelwacker!bloom-beacon!ZURICH.AI.MIT.EDU!jinx From: jinx@ZURICH.AI.MIT.EDU ("Guillermo J. Rozas") Newsgroups: comp.lang.scheme Subject: - and / with one argument should be identity functions. Message-ID: <8911151802.AA29786@zurich.ai.mit.edu> Date: 15 Nov 89 18:02:36 GMT References: <4520@skiscs.vu.nl> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jinx@zurich.ai.mit.edu Organization: The Internet Lines: 22 Date: 13 Nov 89 17:17:21 GMT From: Via Fons Botman PLease, let's *not* define (- X) and (/ X) to be something else than X. It might be the source of obscure errors in (admittedly ugly) code like: (define (net-gain gain losses) (apply - gain losses)) You should be using some version of reduce here. Apply is generally the wrong thing to use. Besides that, it may be cute, but it is neither clear nor consistent, and therefore not "in the spirit of Scheme". Why isn't it consistent? - and / are left associative and thus it is natural and consistent to place the (right) identity on the left. :-) Although (/ x) is atypical, that can hardly be said for -. Most languages treat unary - specially. In addition, the "special" meaning for both is traditional in Lisp.