Python vs .Net

Peter Hansen peter at engcorp.com
Mon Jan 6 14:17:36 EST 2003


Greg Brunet wrote:
> 
> "Peter Hansen" <peter at engcorp.com> wrote in message
> news:3E197F7C.D4549EC5 at engcorp.com...
> > Greg Brunet wrote:
> > >
> > > - VB.NET (as well as C##) are/can be very strongly statically
> typed -
> > > even more so than VB6.  I'm still trying to determine if I like a
> > > strongly _dynamically_ typed language like Python.  I'm having a
> hard
> > > time understanding why it's not better to know at compile time that
> > > ['foo' + 5] is an exception.  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.
> >
> > While the specific example you quote, where two statically defined
> > *constants* are being added, *could* be caught by the compiler,
> > it's pretty rare to be doing that anyway.  More likely you would
> > be doing something like ['foo' + bar] where bar is bound to the 5.
> > That would not be catchable until runtime, by definition.
> 
> Actually, it is catchable at compile time with a statically typed
> lanugage.

Ummm... obviously.  I meant it *could* be catchable even with Python
if the compiler were changed.  

-Peter




More information about the Python-list mailing list