[Types-sig] Static typing considered HARD

Uche Ogbuji uche.ogbuji@fourthought.com
Sun, 05 Dec 1999 02:04:31 -0700


David Ascher wrote:
> > I program in Python perhaps 40 hours a week, and have done so for a long
> > time.  Most of what I work on are large-scale systems.  Very strange
> > that my typos (and they are legion) are much less catastrophic than your
> > own.
> 
> Ah, well, probably you're just better at it than I am.  =)
> 
> My programs are typically small and run for a long time.  They also change
> ten times daily due to the changing nature of the requirements.  There is
> no 'finished' program in my current line of work.  Just a different way of
> doing business.  Note that developing a test suite for this sort of code
> is unrealistic.  I'm paid to do science, not to do regression tests, and
> the regression suite is likely to be longer and buggier than the actual
> code.
> 
> Perhaps it's best if we took this off-line though -- I think we're
> straying from the types-sig charter.

I'll just quickly round things up by saying that many of the hard
lessons I've learned about software defects pre-date my use of Python. 
Lessons such as "the open/closed principle", "dependencies between
modules should be as much as possible in the form of a DAG", "testing
should bubble up from low-level object interfaces and coverage to
high-level object-collaboration and sequence".  These ideas are neither
helped nor hurt by Python's dynamicism.  All the latter is is a tool to
improve the expressiveness of programming.  This expressiveness, in my
experience, lowers the cost of Python programming independently of the
other factors, and it is what attracts me to the language.  As an aside,
re: expressiveness: ideas of type and all that are not "natural", which
is why I wonder that your students clamor so much for static typing.

I've programmed C++ for 6 years or more and Java for at least a couple
of years, and in my experience, developers of similar skill will inject
many more defects into an application using C++ and Java than they will
using Python.  That's why I am resisting radical change of the status
quo.  I worry that we might upset the formula that works so well for
Python.

But I guess there's no point continuing to gripe until I know the nature
of the poison.  Until I see some concrete proposal, I guess, I'll end
the thread.

-- 
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@fourthought.com	(970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com		http://OpenTechnology.org