[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
plea for macros
- To: SCHEME @ MIT-MC
- Subject: plea for macros
- From: George J. Carrette <GJC @ MIT-MC>
- Date: 27 March 1985 11:08-EST
How about biting the bullet and admitting macros in a way such that
the language can have only one special form: LAMBDA, and all other
forms are defined as macros, even "IF". (To repeat something I've
either seen in a scheme paper or a scheme compiler:
(IF A B C) => (*IF A (LAMBDA () B) (LAMBDA () C)), where *IF is
a hand-coded SUBR). The proper packaging of macros and macro namespaces
would put a lot of budding languages designers amoung us out of business.
Think of scheme as an OEM oriented language. The designers can supply
not much more than the primitives used a "Structure and Interpretation"
the essential ideas and tools, then all manner of interesting (or not)
things can be built on these without being the responsibility of
the designer.
The fact is that there are very large, useful, and even intrinsically
interesting lisp programs that are built on very few primitives. Case
in point: Macsyma. In order to do Macsyma in what common-lisp provides
I had to write my own versions of: GET, EQUAL, ASSOC, PUTPROP, +, -, /, ^, \,
MEMBER, MAP, MAPLIST. One page of code, big deal.