PythonBlackBoardArchitecture

ThoughtStorms Wiki

This is a good thought on ProgrammingLanguagePlatformWar by PhillipJEby : http://dirtsimple.org/2004/12/java-is-not-python-either.html

and there is a good continuation on PythonInterfacesAreNotJavaInterfaces

I started writing a response to the original, below (but may need to revise). Nevertheless I think the idea is interesting :

I'm wondering what an Interface is for.

I sort of know (in the sense that I've used them in Java) but I'm still not entirely comfortable I understand the notion perfectly.

But what I think Interfaces are for, is to plug different things together. These might be different libraries used in the same program, different programs on the same machine, or even different programs running on different machines.

And when I think about this, I think of the two most beautiful and widely used "interfaces" in computing : Unix pipes, and http. These are very, very simple. And consequently very, very powerful. The quality that also maps on to what I think of as "Pythonic".

So then I wonder. Maybe the issue is not so much, does Python need interfaces. We would certainly like to be able to plug things together. But does Python need anything like the Interface culture that has grown around Java?

Would something like this be an alternative to documented Interfaces? A virtual bus / blackboard / message-passing architecture - implemented as a simple standard Python library.

Almost every large Python program would include this blackboard. And any framework would define a set of standard messages / tokens that could be used to talk to it, via the blackboard.

Now, this is still an abstract interface. Any framework that understood and produced the same messages could be substituted for another. And you would, indeed, document the vocabulary that a particular framework understood.

Yet, somehow this seems more attractive to me than Java's culture.

First, and this might be a psychological illusion, it starts as a "service" rather than a "constraint". I have a new communication channel to play with, not a set of specs to read.

But is there a better way of justifying this? Perhaps it's something that allows me to learn and develop incrementally?

TO BE CONTINUED

I think Java interfaces were designed primarily as a way to provide multiple inheritance, which Python supports directly. –BillSeitz

: spoken like a true Pythonista :-) I'm responding, but moving this discussion to ProblemsWithInheritancePhilJones

See also :