[Python-Dev] Re: Reiterability
Alex Martelli
aleaxit at yahoo.com
Mon Oct 20 18:24:04 EDT 2003
On Monday 20 October 2003 07:08 pm, Guido van Rossum wrote:
> > Darn -- one more underground attempt to foist adaptation into Python
> > foiled by premature discovery... must learn to phrase things less
> > overtly, the people around here are too clever!!!
> >
> :-)
>
> I'm all for adaptation, I'm just hesitant to adapt it wholeheartedly
> because I expect that it will have such a big impact on coding
> practices. I want to have a better feel for what that impact is and
> whether it is altogether healthy. IOW I'm a bit worried that
Wise as usual. I suspect adaptation should enter Python when interfaces
or protocols or however we wanna call them do, and I remember your
explanations about wanting to see real-world experience with that stuff,
because there will be ONE chance to get them into Python "right".
> adaptation might become too attractive of a hammer for all sorts of
> problems, whether or not there are better-suited solutions.
Well, OO has that problem too -- I see people (mostly coming from
Java:-) STARTING with designing a class, by reflex, even when a
couple of functions are more suitable. It generally doesn't take ALL
that much to wean them from such "premature complexity" if they
work with some non-OObsessed Pythonistas. Protocol adaptation
is "an attractive hammer" much like OO is, without the further issue
of there being very popular "protocol adaptation oriented languages"
around:-), so I don't think the worry is really justified.
I've seen another poster use a similar analogy with generic functions
and multimethods (which btw we DO have in pypy as an implementation
strategy, see http://codespeak.net/ and browse or download at will),
and perhaps that's equally suitable too.
Alex
More information about the Python-Dev
mailing list