[Python-Dev] Re: decorators and 2.4

David Abrahams dave at boost-consulting.com
Mon Jun 28 13:27:24 EDT 2004

Jeff Bone <jbone at deepfile.com> writes:

>> Uh, the WHOLE POINT we want this is to have side-effects.  If it
>> doesn't make the function act in a different way, it might as well
>> live in the doc string or something.
> Declarative vs. imperative.  Design-time *definitional* modification
> of behavior vs. runtime.  I don't really think you want side-effects
> in the literal sense.  E.g. "classmethod" isn't a side-effect, it's a
> definitional thing.  If you really want side-effecting operations on
> functions, you've already got that given higher-order / first-class
> functions.

I'm a big fan of declarative programs.

That said, declarativeness (especially in Python) is more a matter of
"notational flavor" than anything we can measure.  It's certainly
independent of whether there are actual side-effects.

Also, I'm suspicious of any heroic efforts to prevent language
features from being "abused".  Some of the most powerful techniques in
many languages were not envisioned by the language designers.  The
languages I like (by their nature) tend to encourage the invention of
these unforseen techniques.  Python is one of them.

Dave Abrahams
Boost Consulting

More information about the Python-Dev mailing list