Should I write a book on Python Metaprogramming ?

andrew cooke andrew at acooke.org
Mon May 5 15:57:08 EDT 2003


mertz at gnosis.cx said:

> In that sense, I think Cooke's comment that combinatorial HOFs aren't
> metaprogramming (to those familiar with FP) is a bit off base.  HOFs are
> possibly the very best example of metaprogramming.  That is, they take
> things (functions) that programmers write at a first level, then
> manipulate those programmatic things to create new programs (combined
> functions).  The familiar HOF function 'compose()', for example, isn't
> particularly -complicated-, but it -is- quite distinctly "meta."

ah.  ok!

i was actually wondering whether this would run into a thread about "what
metaprogramming is" since it was obvious that i, at least, was talking at
cross purposes to others.

fwiw i took it to mean something like: changing the semantics of the
language to simplify solving particular problems.  hence my examples of
protoype-based oo (which i think should be possible, given python's
dynamic nature) and transparent distributed computing.

for me that's a much more interesting book than one that focuses on higher
order abstractions (it also implies a very language-specific focus, hence
my confusion about how the book could be general).  however, i get the
impression i'm in a distinct minority (even more so considering i'm not
that bothered about code examples :o) so it's probably not the book you
should be writing... (otoh i can think of several books - sicp, cousineau
+ mauny - that already do that kind of thing very well, although not in
python)

cheers,
andrew

-- 
http://www.acooke.org/andrew





More information about the Python-list mailing list