does lack of type declarations make Python unsafe?

Duncan Booth duncan at NOSPAMrcp.co.uk
Thu Jul 3 04:14:19 EDT 2003


aaron at reportlab.com (Aaron Watters) wrote in
news:9a6d7d9d.0307020959.634ceb4e at posting.google.com: 

> 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 didn't write any of the stuff you quoted from Dave Abrahams post. If you 
are going to trim all of my text as irrelevant to your reply, then please 
trim my name as well.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?




More information about the Python-list mailing list