does lack of type declarations make Python unsafe?

Bob Gailer bgailer at alum.rpi.edu
Wed Jul 2 23:01:59 CEST 2003


At 10:59 AM 7/2/2003 -0700, Aaron Watters wrote:

>David Abrahams <dave at boost-consulting.com> wrote in message 
>news:<usmq86vit.fsf at boost-consulting.com>...
> > Duncan Booth <duncan at NOSPAMrcp.co.uk> writes:
> >
> > I'm not saying that Python isn't a wonderful language -- it is.  It's
> > great to have the flexibility of fully dynamic typing available.  All
> > the same, I'm not going to pretend that static typing doesn't have
> > real advantages.  I seriously believe that it's better most of the
> > time, because it helps catch mistakes earlier, makes even simple code
> > easier to maintain, and makes complex code easier to write.  I would
> > trade some convenience for these other strengths.  Although it's very
> > popular around here to say that research has shown static typing
> > doesn't help, I've never seen that research, and my personal
> > experience contradicts the claim anyway.
>
>I'm somewhere on the fence.  I've seen static typing catch errors,
>but I've also seen static typing (in java, say) make the use of a
>hash table into an exercise in code obfuscation.  I'd really like some
>sort of compromise where you could harden types incrementally.  Also
>static typing can make it more difficult for bad programmers to do
>stupid things...
>
>I'd like to see research either way.  I've heard of rumored research
>in both directions.  Personally, I suspect the widely repeated statement
>"90% of programming errors are typing errors" can be traced back to the
>60's when engineers wrote programs on graph paper-like sheets and
>handed them to TYPISTS who then TYPED THEM WRONG onto punch cards.

Except, of course, they were not typists, they were key punch operators, 
and they key-punched. There is of course some skill set overlap, but key 
punching was an art of its own. (former key punch operator, though strictly 
for my own programs).

In addition to the key punch there was also a "verifier" which looked for 
all practical purposes like a key punch. You fed it punched cards, keyed 
what was supposed to be on each card, and the verifier would complain if 
there was a mismatch. There was, also, as I recall, an "interpreter" which 
would read cards and print the value of each column on the top of the card. 
The really skilled operators also were experts at programming the little 
drum that specified what was allowed or not in each column, and tab stops 
for skipping to the next input column.

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.492 / Virus Database: 291 - Release Date: 6/24/2003


More information about the Python-list mailing list