The term "Protocol"
aahz at pythoncraft.com
Mon Aug 2 16:44:38 CEST 2004
[cc'ing Alex so he can jump in if he wants]
In article <mailman.1042.1091409923.5135.python-list at python.org>,
Bruce Eckel <BruceEckel at MailBlocks.com> wrote:
>I know the term "protocol" has been used to describe a language feature
>in a number of languages, but since we have no official "protocol"
>support in Python I'm interested in what "we" mean by this term. I'm
>going to guess that a protocol is like an interface in Java, except
>that it doesn't have a concrete definition anywhere, but it is implied
>through convention and use. Thus a protocol is a "latent interface." Am
>I close? I'd like to understand this term better.
Alex Martelli gave an excellent presentation on Design Patterns at OSCON,
where he made the point that "interface" is roughly equivalent to syntax,
whereas "protocol" is roughly equivalent to syntax plus semantics. In
other words, computer langauges rarely (if ever -- although I suppose
Eiffel comes close) enforce protocols in any meaningful way.
I'm hoping Alex posts his slides soon.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"To me vi is Zen. To use vi is to practice zen. Every command is a
koan. Profound to the user, unintelligible to the uninitiated. You
discover truth everytime you use it." --reddy at lion.austin.ibm.com
More information about the Python-list