does lack of type declarations make Python unsafe?

Steven Taschuk staschuk at telusplanet.net
Tue Jun 17 12:11:16 EDT 2003


Quoth Brandon Corfman:
> 1) Why can't this issue be solved by making Python like Lisp/Dylan in 
> this regard? Make type declarations/range limitations on variables an 
> optional thing. Flexibility if you need it, safety later if you're 
> concerned about it.

This was discussed in the now-defunct types-sig, if memory serves.
    <http://www.python.org/sigs/types-sig/>
I've never looked into it, but I imagine the archived discussions
there might shed some light on why this hasn't been done.

> 2) It also seems that the Python community wastes too much time on these 
> explanations. A better answer (in my mind) would be to say that the 
> Python environment is designed to make the development process far 
> different than in a statically-typed language like C++.

That seems like a good answer (though I don't think it replaces
the other explanations in the thread so much as it augments or
summarizes them).

As for us wasting our time with these explanations, well, the
usual solution (such as it is) would be to write up a FAQ entry
and direct future querents to it.  Would you like to write one?

  [...]
> of these combine to make Python a development environment that 
> encourages functional programming _and all development should be done 
> this way_. [...]

(I don't think "functional programming" means what you think it
means.  Functional programming is programming without
side-effects.)

  [...]
> I think the problem is that a C++/Java programmer regards the Python 
> command prompt as little more than a calculator or a place to type 
> "prog.main()". I know I did at first.

Good observation!  I made that mistake too.

-- 
Steven Taschuk                            staschuk at telusplanet.net
Every public frenzy produces legislation purporting to address it.
                                                  (Kinsley's Law)





More information about the Python-list mailing list