Interface files was: Re: Python Considered Harmful

Paul Prescod paul at prescod.net
Mon Dec 27 05:23:30 EST 1999


I don't appreciate the subject line. It doesn't seem to honestly reflect
your opinion and it just gives newcomers to the newsgroup a bad first
impression.

Eric Lee Green wrote:
> 
> 1) The interface specification is the implementation. There is no seperate
> ".h" file such as with C++ that would contain the interface specification.
> With a big "C" or C++ project I print out the ".h" files and there's my
> interface specification 
>...
> [Python is]... making keeping the design doc and
> the implementation in sync a pain in the @%!#....

Pythonistsas tend to think that keeping the ".h" and ".c" files in sync
is a pain in the @%!#. That's why most Pythoners think that if your
problem is documentation then the better strategy is to write tools
specific to documentation rather than changing the programming language
to fit the needs of the documentation system. You are encouraged to help
us with the definition and implementation of those tools. In particular
see:

http://www.python.org/pipermail/doc-sig/1999-December/thread.html

You'll see we have something much more useful and elaborate than
printing out .h files under development.

Interface files might be a good idea for OTHER reasons, not related just
to documentation, so there is also some work being done on that front.

> 2) Debugging is a mess. The problem is that I tend to "stub" things a lot, or
> reference
> functions that have not yet been written (they're in the design doc, okay, so
> I know what their interfaces will be, I just haven't written them yet!). With
> a compiled language I run the compiler and linker and it tells me "hey stupid,
> you're missing something". 

There are various efforts under way to allow you to treat Python as a
statically checked (even binary-compiled) language if you want it to. 

> Of course, there's the one big advantage of Python -- it's quicker'n greased
> lightning for writing things in. I did in a month what would have taken four
> months in C++... 

It seems to me that that is really what matters, isn't it?

 Paul Prescod




More information about the Python-list mailing list