xerox@cs.vu.nl (Via Fons Botman) (11/14/89)
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)) Besides that, it may be cute, but it is neither clear nor consistent, and therefore not "in the spirit of Scheme". At least, that's my opinion.
cph@ZURICH.AI.MIT.EDU (Chris Hanson) (11/15/89)
Date: 13 Nov 89 17:17:21 GMT From: Via Fons Botman <mcsun!hp4nl!star.cs.vu.nl!xerox@uunet.uu.net> PLease, let's *not* define (- X) and (/ X) to be something else than X. Besides that, it may be cute, but it is neither clear nor consistent, and therefore not "in the spirit of Scheme". While it may be "cute" to use this pun, I think your argument about clarity is incorrect: it is unusual for someone to be confused by this usage of `-' (I don't know about `/'; I suspect it is rarely called with one argument). In practical terms, it is very much too late to reconsider this decision. Both the R4RS and the Draft Standard for Scheme endorse this inconsistency, and I can't recall any serious debate concerning it. Perhaps if this issue had been raised five years ago something might have been done, but at this point the inertia of standards and implementations make such a change difficult; and this is especially true as it is unlikely to be viewed (by those standardizers and implementors) as being worth much effort. Unfortunately this means that the Scheme community is a kind of authoritarian structure -- but the standardization process is open to anyone who cares to participate, so you too can be one of those in authority. There are two relevant mailing lists: rrrs-authors@ai.mit.edu scheme-standard@ai.mit.edu Interested parties should know that because the Draft Standard is nearly completed, significant reexamination of basic issues on the "scheme-standard" mailing list is inappropriate. The "rrrs-authors" list is currently clearing up final details of R4RS, and debate is welcomed on interesting issues for R5RS. Archives of past discussions on each list are available by anonymous ftp from "zurich.ai.mit.edu" in the directory "pub/scheme-mail/".
jinx@ZURICH.AI.MIT.EDU ("Guillermo J. Rozas") (11/16/89)
Date: 13 Nov 89 17:17:21 GMT From: Via Fons Botman <mcsun!hp4nl!star.cs.vu.nl!xerox@uunet.uu.net> 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.