do...until wisdom needed...

Douglas Alan nessus at mit.edu
Wed May 2 21:40:08 EDT 2001


"Andrew Dalke" <dalke at acm.org> writes:

>> [|>oug:] The type of term you can add to Python with a function is
>> somewhat limited compared to what you could add with procedural
>> macros.  Sometimes a more powerful term-adding capability is
>> incredibly useful and allows you to make programs that are more
>> elegant and easier to maintain.

> Perhaps, but my feeling is that the level of training you need
> for that is greater than most of my clients - chemists and
> biologists - want to go through.  Note that since I've never
> used a language (other than Tcl?) with these sorts of macros
> I don't have specific knowledge of the pros and cons.

Procedural macros are best left to the experienced professional
programmer to implement.  The more casual programmer can significantly
benefit from the work of the expert, though.  The same thing is often
true for classes, especially in C++, for instance.

> I can also point out the almost complete nonexistence of a major
> package in computational chemistry or biology written in a language
> supporting hygenic/procedural macros as an indicator that
> *something* prevents their wider use in my field.

There aren't any widely used languages that have procedural macros
other than Lisp and its variants.  (Perhaps Tcl might qualify, I can't
say for sure, but Tcl isn't at all like Lisp, so don't damn Lisp on
the basis of Tcl.)  And Lisp only really ever caught on in AI circles
and for teaching programming at finer institutions of higher
education.  The reasons for that are complex and I think don't say
much about the pros and cons of procedural macros, or even of Lisp in
general.

|>oug



More information about the Python-list mailing list