Interface files was: Re: Python Considered Harmful

Eric Lee Green e_l_green at hotmail.com
Mon Dec 27 10:20:50 EST 1999


Paul Prescod wrote:
> 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.

Sorry. I was channeling Dijkstra at the time (grin). (Is he still alive?). 

> 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 @%!#. 


True enough, but it's easy to find out whether they're in sync or not -- just
type 'make' :-). 

> 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.

I'll take a look at that when I'm not under deadline pressures so much.
Documentation, BTW, was not my only gripe there -- the whole
interface/implementation issue lies at the heart of object oriented
programming. 
 
> > 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.

Actually, wouldn't JPython do this for me? I'm not familiar with it, but I
thought that it produced Java byte-codes? 

> > 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?

Well, it's nice if the program works right too (grin).

-E



More information about the Python-list mailing list