A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/069277.html below:

Hygienic macros (was: do...until wisdom needed...)

Hygienic macros (was: do...until wisdom needed...)Dave LeBlanc whisper at oz.net
Wed Apr 18 05:19:27 EDT 2001
Sounds so much like Tcl!

On 17 Apr 2001 20:59:52 -0400, Douglas Alan <nessus at mit.edu> wrote:

>Lisp has traditionally had "procedural macros".  Procedural macros in
>Lisp are a kind function -- they are implemented in Lisp, but the
>return value of the macro, rather than being returned as a function
>value, is taken to be a piece of code.  This is easier in Lisp than
>in most languages because Lisp code is a kind of Lisp data structure.
>The code that is returned by the macro call, which is executed at
>compile-time, is used to replace the original call to the macro.
>
>This allows a programmer to define new syntactic forms. These behave
>differently from normal function calls, since they can do things like
>rebind variables in the scope of the macro invocation, etc., and they
>avoid procedure call overhead, so they can be used to effectively
>force inlining.
>
>The problem with non-hygienic macros is that variable names used by the
>macro implementation can conflict with variable names that are passed
>into the macro.  Hygienic macros solve this problem by putting the
>variables in different namespaces.
>
>Hope this helps.
>
>|>oug


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4