
Jeff Bone <jbone@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 http://www.boost-consulting.com