do...until wisdom needed...

Paul Prescod paulp at ActiveState.com
Wed Apr 18 14:36:36 EDT 2001


Andrew Kuchling wrote:
> 
> Paul Prescod <paulp at ActiveState.com> writes:
> > And if some smart people can use hygenic macros to make Python code that
> > is more maintainable or readable, why should they be disallowed? Python
> 
> I'm increasingly opposed to new Python features, but I'm still not
> ruling out the idea of hygenic macros.  Their presence might remove
> the pressure to add new features, which would mean the language core
> would be that more stable.  

I don't really believe that. I tihnk that hygenic macros could and
should be used for:

 1. experimentation

 2. domain specific "little languages" based on Python like ptml or
pyslt or pymake or ...

> I expect it's very difficult to provide a
> simple interface for them in Python, though, because the syntax, and
> the resulting parse trees, are more complicated and less regular than
> in Lisp; maybe I'm just pessimistic, though.

A complicated interface to them might be just what is necessary to make
their use infrequent enough to not be frightening. I would say: "just
hand the macro a parse tree and ask it to return you another one."

-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook




More information about the Python-list mailing list