Automated code generation

John Roth newsgroups at jhrothjr.com
Fri Sep 5 13:39:31 EDT 2003


"Max M" <maxm at mxm.dk> wrote in message
news:3f58ba15$0$97267$edfadb0f at dread12.news.tele.dk...
> Yesterday there was an article on Slashdot:
>
http://books.slashdot.org/article.pl?sid=03/09/04/1415210&mode=flat&tid=108&tid=126&tid=156
>
> It is about automatic code generation.
>
> I got interrested in the subject, did a web search, and it seems kind of
> powerfull.
>
> My main interrest is web development in Zope/CMF/Plone, where there is a
> lot of repeated code in the products. So automated code generation seems
> like a natural fit.
>
> But every time I think of a use case, I immediately think of a way to do
> it with encapsulation instead.
>
> Does anybody have any experience using Python and automated code
> generation where it actually make sense?
>
> Or os it useless in a language as dynamic as Python?

There are a few places where automated code generation makes sense,
but these are mostly trivial time savers. For example, the propery()
function
could be extended to automatically generate trivial getters, setters and
deleters, saving some coding and making things clearer in the majority
of cases.

John Roth
>
>
> regards max M
>






More information about the Python-list mailing list