"Mark Sterin" <firstname.lastname@example.org> writes:
>Jack Jansen <email@example.com> wrote in article <firstname.lastname@example.org>...
>> ...With languages like Python or Tcl, with
>> no interface definitions whatsoever, you can only *hope* that you use
>> every interface correctly. I work on a largish project in Python, and
>> the one thing that gives continuous headaches is the lack of interface
>> definitions. Whenever you change an interface it is very very
>> difficult to check that you haven't inadvertantly broken something.
>This what the regression testing is for, isn't it ?
Regression testing is not good enough. The Python model is great
for small project and during the development stage of big projects,
but at some point you want to be able to cast the interfaces in
concrete, and have the compiler check that all uses and definitions of
the interface are correct.
One of the things regression testing will not catch is
misunderstanding over what the interface exactly is. If I create a
module with a function that sorts a list of integers, but my collegue
thinks that it sorts lists of any numbers, and this assumption is
correct for the first implementation but changed later regression
testing will not catch this.
I would dearly like a "companion language" to Python in which I can
specify what interfaces are. If such interface definitions are
available Python would enforce them, giving me a much safer language,
if they are not available Python would function as it currently does.
Unfortunately I have no idea whatsoever as to how one would design and
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm