[Types-sig] Static typing considered HARD

Uche Ogbuji uche.ogbuji@fourthought.com
Sat, 04 Dec 1999 23:06:14 -0700


David Ascher wrote:
> > No language that I know of does even a tenth of the job of configuration
> > management, error-handling or testing for anybody.  They are not matters
> > for a programming language to address.
> 
> I guess we'll have to agree to disagree.
> 
> I've been doing some playing with Swing using JPython.  Because it's
> wicked slow to start, (due to Java mostly) the
> edit-run-traceback-edit-run-traceback cycle is significantly longer than
> with with CPython.  That's when I curse the fact that the compile-time
> analysis didn't catch simple typos, trivial mistakes in signatures, etc. I
> *love* Python's dynamicity.  But mostly I use its 'wicked cool' dynamic
> features, like modifying the type of a variable in a function call or
> changing the __class__ of an object once in a very blue moon.

I can agree to disagree as well as anyone, but I'll confess I'm still
baffled at how you claim that any language automates configuration
management, error-handling or testing to any significant extent.  I
guess we'll also have to agree to not understand each other.

Also, I don't think I've _ever_ done anything as off-the-wall as
"modifying the type of a variable in a function call or changing the
__class__ of an object".  I hope this isn't anyone's benchmark of
Python's dynamicism.

> In other words, I'm just suggesting that given that (I'd guess) 95% of the
> code out there is such that variable maintain their type throughout the
> life of the program and that the builtins don't typically get overriden,
> it seems a shame not to play the numbers. And we don't have to cover all
> the cases.  Just the 80% which give the largest payoff.
> 
> Another trivial example: I can never remember whether it's
> pickle.dump(object, file) or pickle.dump(file, object).  I tend to
> remember that I don't remember after the simulation has run for two hours
> (if I'm lucky) and the saving of state fails...

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.

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