Python vs .Net

Greg Brunet gbrunet at nospamsempersoft.com
Mon Jan 6 13:28:30 EST 2003


"Brian Quinlan" <brian at sweetapp.com> wrote in message
news:mailman.1041871989.12874.python-list at python.org...
> There is a lot of literature explaining the advantages/disadvantages
of
> static typing. The biggest advantage, IMHO, is that dynamic typing
gives
> you more flexibility.

If anyone has a good link in mind for this, I'd appreciate a pointer.
Googling around, I found this article making a case for dynamic typing
(in Smalltalk - but I get the point):
http://www.chimu.com/publications/short/whyDynamicTyping.html.  After
looking at that article, I'm wondering if it might not be the case that
dynamic typing might be better for folks building framework and core
routines (such as collections, lists, etc.), while static typing might
be better for folks developing 'database/business application level
code'.  Could it be that the additional compile time checking is worth
more to me due to either my coding style, or the types of problems I'm
trying to solve?

> > If I have to wait until runtime, then I
> > would think that I need to be writing LOTS more error checking code
at
> > all my function entry points, whereas with strong static typing, I
can
> > catch all this at compile time.
>
> Type information is usually not sufficient to validate arguments. And
> functions don't validate their arguments in any case. So you often
have
> to do runtime debugging. Python has two things going for it here: very
> rich exceptions and a good unit testing framework.

I agree that my job is not done by simply relying on strong static
typing.  Additional validation is often required.  It does, however,
eliminate the need for type-check code within my routines, which would,
I think, add a lot more code if I had to implement it everywhere.

Take care,

--
Greg






More information about the Python-list mailing list