python and macros (again) [Was: python3: 'where' keyword]
Paul Rubin
http
Wed Jan 12 09:16:48 EST 2005
michele.simionato at gmail.com writes:
> > I can't imagine how it could be worse than the learning curve of
> > __metaclass__, which we already have.
>
> To me, learning macros *and their subtilities* was much more difficult
> than learning metaclasses.
I guess I've only used Lisp macros in pretty straightforward ways,
that weren't hard to understand. That's enough for anything I've
needed. But we don't hear much about __metaclass__ because almost
nobody understands it.
> Go to comp.lang.scheme and google for "macros and module system";
> you will get everything you want to know and much more!
OK, I might do this.
> Well, I see this as a positive fact. If a syntax is contrived (such
> as a ternary operator, for instance) it is better *not* to have it
> than to have one hundred custom made syntaxes. At the end, we are
> just talking about syntax sugar here, not about lack of
> functionality.
I think the idea is there would be some experimentation and then one of
the versions would make it into the standard library.
> > [compiling Lisp to Python bytecode]
> This is a bizarre idea if you want to make Python run faster. It is
> not so bizarre if what you want is to have access to Python from
> Lisp/Scheme in the same sense Jython has access to Java.
Why not just use a foreign function interface?
More information about the Python-list
mailing list