Interface files was: Re: Python Considered Harmful

The Blue Wizard TheBlueWizard at pressroom.com
Mon Dec 27 20:26:10 EST 1999


Eric Lee Green <e_l_green at hotmail.com> wrote in article
<A9602AA2A6AB3F1E.DFD0EAEBC0CC6C3F.F7EBB6E67C7C3B55 at lp.airnews.net>...
> Paul Prescod wrote:
[snip]
> > 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' :-). 

Um...I for one prefer to have my codings localized, which means I prefer to
not separate out interfacing stuff from implementation stuff, so I can look
at
a given code fragment and know immediately how it is used/implemented so
I can fix it as needed.  The same goes for variables and other parts.

[snip]
> > > 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.

kewl

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

It is tough to design a "perfect" language...I recently ran into a
situation
which calls for some logic-like programming, and I found that I can't
readily
whip it up using Python like I would with Prolog for example....oh well!

Keep-on-wishing-ly yours,

The Blue Wizard




More information about the Python-list mailing list