Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!yetti!oz From: oz@yetti.UUCP Newsgroups: comp.lang.lisp Subject: Re: First Class Environments in Scheme? Message-ID: <179@yetti.UUCP> Date: Mon, 26-Oct-87 01:44:12 EST Article-I.D.: yetti.179 Posted: Mon Oct 26 01:44:12 1987 Date-Received: Tue, 27-Oct-87 06:50:42 EST References: <3431@sol.ARPA> <23200001@silver> <2095@watcgl.waterloo.edu> Reply-To: oz@yetti.UUCP (Ozan Yigit) Organization: York U. Computer Science Lines: 44 Keywords: scheme, macros In article <2095@watcgl.waterloo.edu> Doug Moen writes: >... >Has anyone done work that "solves" the macro problem? > Yep. It is scheme84's "syntax extension" facility: "Scheme84 allows the user to declare new special forms. Such constructs are syntactic entities that are *expanded* during compilation of code that used them. In other dialects of lisp and other versions of Scheme, similar constructs are called macros" [Scheme84 Ref Man - Rep 153] I think this pattern-based extension facility is so elegant that it makes ordinary lisp macro facilities look like a horrendous (can you say bletcherous?) cludge. example: syntactic extension "and" (declare-syntax and () [(and) true] [(and e) e] [(and e1 e2 ...) (if e1 (and e2 ...) false)]) The ellipsis (...) is a part of the definition, and used to specify arbitrarily long lists. Intrigued ? See: D. Friedman, C. Haynes, E. Kohlbecker and M. Wand, "Scheme84 Interim Reference Manual", Indiana University Computer Science, Tech. Rep. 153, June 1985 E. Kohlbecker, "Using Mkmac", Indiana University Computer Science, Tech. Rep. 157, May 1984 oz -- You see things, and you say "WHY?" Usenet: [decvax|ihnp4]!utzoo!yetti!oz But I dream things that never were; ......!seismo!mnetor!yetti!oz and say "WHY NOT?" Bitnet: oz@[yusol|yulibra|yuyetti] [Back To Methuselah] Bernard Shaw Phonet: [416] 736-5257 x 3976