Could Python supplant Java?

Peter Hansen peter at engcorp.com
Wed Aug 21 00:58:51 CEST 2002


FISH wrote:
> 
> > IMHO, compile time type-checking is a nice safety net, but if you get a
> > type error at compilation, it still means you made a mistake.
> 
> Yes, but the error is flagged in compilation, as opposed to
> five weeks after the product ships, when it crops up in a bug
> report from a customer.

Of course, if you actually test your product you can pretty easily
catch such problems _before_ it ships, as has been pointed out
repeatedly in this forum and elsewhere for years.

> Strong and weak typing have their place.  

Perhaps, but another item frequently discussed here is how Python,
while having dynamic typing, also *does* have *strong* typing.  It
does not have weak typing.  (And personally, I'm not convinced weak
typing does have its place, either. :)

> Dynamic types are less
> hassle to work with, but of course they push an added burden of
> testing onto the developer - because mistakes are not so easily
> spotted.  

I would agree they push an "added" burden on those developers who
would not otherwise test their code...

> This is one of the reasons why I do not consider Python a suitable
> alternative to Java.  Dynamic typing is fine for scripts, but when
> it comes to full-blown 'ten thousand line' applications you really
> should be looking as something IMHO which gives you the added
> security of strong typing, to catch as many potential bugs as
> possible.

Damn.  We'll have to throw out our 10000-line-plus applications
and the many lines of test code, since obviously using Python cannot
work.  We'll have to retrieve the various products from the field, as
well, and tell our customers they were delusional when they thought
they were using them successfully.  ;-)

Really though, your beliefs are shared by many, but not necessarily 
valid.  Many of us have written many many programs in statically
typed languages, and yet we find greater benefit in using Python,
*especially* for very large applications.  Why do you think that
might be?  It seems unlikely we all have such poor judgment as to
be entirely wrong about it...

-Peter



More information about the Python-list mailing list