[Zope-dev] Defining Interfaces
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 30 Jan 2002 17:33:41 +0000
On Wed, 30 Jan 2002 10:08:35 -0700, Jeffrey P Shell
<jeffrey@cuemedia.com> wrote:
>>> Or, if you were defining the interface in IDL (mmm,
>>> almost-avoiding-redundancy through acronyms!) with the target =
language being
>>> Python, would you include self?
>>=20
>> But what if you were defining an interface as a Python class, with the
>> target language being <anything except python>. Would you include
>> self?
>
>I'm saying that you wouldn't. The point of IDL/ISL is that you =
wouldn't,
>because the interface that you're specifying is independent of the =
target
>language.
Perhaps you misread. I agree the specification is independant of the
target language. I agree that the content of the specification should
be independent of the specification language.
However, Im sure you agree that the text of the specification is
intimitely dependant on the specification language.
Using python classes as the specification language, but not including
the 'self', seems (IMHO) to be as crazy as using C++ classes as the
specification language but not using curly brackets.
>> I think my conclusion here is that using python classes to define
>> interfaces may be counterproductive.
>
>It may be the best we have (it's best understood by the target =
development
>audience)
As a product author I thought I *was* the target audience.
>..[1] http://python.sourceforge.net/peps/pep-0245.html
A good reference, thanks
Toby Dickenson
tdickenson@geminidataloggers.com