A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-January/050830.html below:

[Python-Dev] PEP 246, redux

[Python-Dev] PEP 246, reduxPhillip J. Eby pje at telecommunity.com
Mon Jan 10 23:19:02 CET 2005
At 02:27 PM 1/10/05 -0500, Clark C. Evans wrote:
>If this proposal was "packaged" with an "interface" mechanism, would
>this address your concern?  In this scenerio, there are two cases:
>
>   - Older classes will most likely not have a __conform__ method.
>   - Newer classes will use the 'interface' mechanism.
>
>In this scenerio, there isn't a performance penalty for the
>usual case; and for migration purposes, a flag could be added
>to disable the checking.

As I said, after more thought, I'm actually less concerned about the 
performance than I am about even remotely encouraging the combination of 
Liskov violation *and* concrete adaptation targets.  But, if "after the 
dust settles" it turns out this is going to be supported after all, then we 
can worry about the performance if need be.

Note, however, that your statements actually support the idea of *not* 
adding a special case for Liskov violators.  If newer code uses interfaces, 
the Liskov-violation mechanism is useless.  If older code doesn't have 
__conform__, it cannot possibly *use* the Liskov-violation mechanism.

So, if neither old code nor new code will use the mechanism, why have it?  :)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4