[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: common-lisp@SU-AI.ARPA
- Subject: [JAR@MC.LCS.MIT.EDU: changes]
- From: Guy Steele <gls@THINK-AQUINAS.ARPA>
- Date: Thu, 3 Apr 86 10:56 EST
- Cc: gls@THINK-AQUINAS.ARPA
From the SCHEME mailing list:
Date: Tue, 1 Apr 86 21:42:41 EST
From: Jonathan A Rees <JAR@MC.LCS.MIT.EDU>
I intend to add all the hyperbolic trig functions to Scheme. Also, the
gamma function, Bessel functions, and Legendre polynomials. I use these
all the time and don't know how anyone gets by without them.
I think Scheme numbers are really ad hoc. The ring should be a required
argument to +, *, etc. so that they know where the answer should come
from. (E.g. (+ 4 7 (MOD Z 5)) ==> 1.) Scheme should support arithmetic
mod N, polynomial arithmetic, and arithmetic in arbitrary algebraic
number fields. Complex number fall out as a special case:
(SQRT -1 (MOD (POLY R) (LAMBDA (X) (+ (* X X) 1 R)))) ==> 1i
This should be easy to implement.
I don't see why we need all these random special forms. For example,
there's no need to have QUOTE or LAMBDA. We can write
(SET! (X Y Z) (+ X (* Y Z N) N))
(LAMBDA (X Y Z) (+ X (* Y Z N) N)).
No ambiguity will result because if the first thing is a list then
obviously the expression can't be an assignment. Similarly, we should
(SET! (D #(A (B C) 4)))
(QUOTE (D #(A (B C) 4)))
because what would one-argument SET! mean?
I don't understand why there's no existential quantifer in Scheme.
For example, I often find myself wanting to write
(EXISTS (X) (AND (MEMQ X L1) (MEMQ X L2)))
to find out whether the lists L1 and L2 intersect.
If we have first-class continuations I don't see any reason why we
shouldn't have first-class stores also. E.g.
(LET ((Z (CONS 1 2)))
(SET-CAR! Z 3)
(LIST (CAR Z) (S (LAMBDA () (CAR Z)))))))
==> (3 1)
And while we're on the subject of modules, why don't we just adopt
Common Lisp's package system wholesale? It's really useful and elegant.
Also Zetalisp's LOOP construct is really good.
I'll put all these features in the report (Penguin Books has already
expressed interest, by the way) unless people send me enough money.