Does Python really follow its philosophy of "Readability counts"?

Mark Wooding mdw at distorted.org.uk
Fri Jan 23 14:37:14 EST 2009


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:

> You've built something full of user serviceable parts. You've
> insisted, publicly and loudly, that the ability to modify those parts
> is absolutely essential, you've rejected every effort to lock down
> those internals, and then when somebody does exactly what you
> encourage, you suddenly turn on them and say they're on their own.
>
> That's pretty irresponsible behaviour. 

An egregious mischaracterization.

Again, you're refusing to see the distinction between a published,
stable interface, and exposed but potentially volatile internals.  If
you use my published interface and your program is broken by a change,
it's my fault and I try to fix it; if you use the internals and your
program's broken by a change, it's your fault and you're on your own.
It's pretty easy.

There are three possibilities:

  * The interface does what I want it to do.  Cool.  I win.

  * The interface doesn't do what I want it to do, but I can hack the
    internal guts until it does.  Cool for now, but I might get screwed
    later if they change.  Well, it's something to think about.

  * The interface doesn't do what I want it to do, and I can't hack the
    internal guts.  I just lose.

If all interfaces were perfect, there wouldn't be an argument.  But they
aren't.  So we're sometimes left with the other two choices.  Which one
looks more appealing to you?

-- [mdw]



More information about the Python-list mailing list