[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Proposal to add fexprs



Macros are like functions, but arguments are passed to them with their original syntax, instead of evaluated. “Fexprs” are first-class macros - macros that can be accepted by functions and macros as arguments and can be returned by functions as arguments.
In 1980, Kent Pitman published a paper titled “Special Forms in Lisp” in which he attacked fexprs with the reason that static analysis cannot determine whether an operator is a function or a macro. Most Lisps subsequently eliminated fexprs. However, his objection does not apply to Scheme:
  1. You can already emulate them with functions that are called like (macro ‘(anything you want) ‘(just everything she wants))
  2. Scheme is intended to be a language which is designed to be small but powerful and flexible.
There have been recent interests in reintroducing fexprs to Lisp. Many newer Lisp dialects, for example newLISP and Kernel include fexpr.
So I propose to reintroduce fexprs, or first-class macros, into Scheme.
What do you think?
Please respond soon.
Thanks!

Post scriptum: How are you going to standardize this? As a SRFI, in R7RS-large or in R8RS?
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports