[XML-SIG] foo.bar vs. foo.get_bar()
Jack Jansen
jack@oratrix.nl
Mon, 08 Nov 1999 00:08:53 +0100
Recently, Paul Prescod <paul@prescod.net> said:
> Is anyone yet willing to agree with me that computed attributes should
> be a language feature? Say uncle dammit!
If and only if you can come up with an efficient implementation. If it
means that for every attribute "foo" declared somewhere in a base
class the interpreter will not only have to look up "foo" but also
"__getcomputedattr__" in every intermediate class I think it will slow
things down too much, for all programs using inheritance.
But, of course, I'm perfectly willing to be convinced it can be done
efficiently. The __getattr__ hook is much to lowlevel a feature for
something useful like computed attributes.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm