Looks like the only necessary primitive is something like ##namespace-resolve
which takes an symbol as the argument and return a full current-namespace#symbol
as the result. Then we can build the whole "alias" based system with it.

Does gambit have it internal?

Meng

On Tue, Mar 27, 2012 at 12:31 AM, Per Eckerdal <per.eckerdal@gmail.com> wrote:
Hi,

On Monday 26 March 2012 at 18:10, Alex Queiroz wrote:

On Mon, Mar 26, 2012 at 6:01 PM, Marijn <hkBst@gentoo.org> wrote:

I would be interested in knowing how this proposal compares with
implementing a low-level hygienic macro system such as syntactic
closures or explicit renaming macros. Actually now that I said that
this proposal sounds very much like a (partial?) implementation of
explicit renaming macros on top of the defmacro system. Doesn't the
paper you referenced mention something like that as well?

I would rather have syntactic closures as well.
Syntactic closures are much more complex, both conceptually and in practise to implement. The purpose of the designed outlined in this proposal is to not require to augment the language with a highly complex new identifier type that is distinct from symbols.

With this proposal, no new data type is required. You can write macros that only accept pure s-expressions (as they are parsed) as input, and only return pure s-expressions (that are pretty-printable without losing information, so it's easy to understand exactly what the return value means)
The paper contribution
seems to be focused on the fact that it's possible to write hygienic
macros on top of unhygienic macros and symbol macros, which is what
Common Lisp has. Besides it says that a code walker is not needed, but
that is not a necessity if the macro system would be integrated in
Gambit.
It is true that the paper is written in that context. I believe its ideas are more broadly applicable than what the paper describes.

Cheers,

Per

_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list




--
Zhang Meng
School of Software Engineering, Tongji University
MP: +86 151-2103-2798