[Edu-sig] quantum instance
john.zelle at wartburg.edu
Mon Sep 19 05:02:39 CEST 2005
> My only objection to it being there - in fact - is the lack of consensus as
> to the compelling reason it is necessary. There seems to be agreement, in
> fact, on only this one aspect of the reason for its presence as a built_in
> function. The fact that the reason is compelling.
I thought we already agreed that properties are a _convenience_. We
could already do everything that properties give us using __getattr__
and friends. The _convenience_ was added because many people find it
useful. You seem to be saying that having multiple good reasons for a
feature is an argument against its inclusion! Most of us consider
multiple justifications evidence of a compelling feature. To extend the
argument in your direction: I _can_ do everything I _need_ to do in C++,
Java, or even assembler. I choose to use Python exactly because it makes
the things I need to do _more convenient_ to accomplish.
Mind you, I have managed quite well in Python without properties. Now
that I have them, I will use them. Furthermore, because it allows me to
do something I feel is useful in a simpler way, I will probably use them
more often than I used __getattr__ magic before. That is, the benefit I
derive (attribute access syntax with implementation independence) is now
offset by an even smaller overhead cost (code complexity). Plus my code
is more transparent, a double win. And it in no way affects how you have
to write your code, so that argument that you don't want to do things
the "Java way" (or any other way) is a complete strawman.
I still have not read an argument that the property feature itself is in
_any_ way a bad thing. Only your claim that some people may like them
for reasons that differ from Guido's (and even that is open to
interpretation--I happen to view Guido's use-case and the
implementation-independence use-case as one and the same). Hence I stand
by my previous conclusion that properties are an unambiguously Good
> Whatever the hell it is.
"It" is convenience. Convenience is the compelling argument. I guess
I'll have to accept your offering the we simply disagree here. My only
misgiving is that I still don't know exactly what we're disagreeing
about. But we've probably already spent more time and effort than this
particular disagreement was worth.
John M. Zelle, Ph.D. Wartburg College
Professor of Computer Science Waverly, IA
john.zelle at wartburg.edu (319) 352-8360
More information about the Edu-sig