Why static typed languages are sometimes better.
me at privacy.net
Fri Jul 2 14:05:17 CEST 2004
On Fri, 02 Jul 2004 06:29:40 GMT,
"Mike Austin" <mike at mike-austin.com> wrote:
> There are dynamically typed language such as Dylan and CLOS that
> can put restrictions on what type of arguments are passed to
> functions, and fail if there is no match. Although this is
> using a mechanism -- multimethods. On that thought, are
> multimethods considered to be a form of type checking, or simply
> a mechanism? Hmm.
Is "Object Oriented Programming" a form of type checking, or
simply a mechanism?
def a( self ): print "A.a"
def a( self ): pass "B.a"
def foo( an_object ):
foo( A( ) )
foo( B( ) )
foo( C( ) )
For that matter, what about imperative programming and simple
print "a" / 4.0
Previous pythons raised exceptions for this:
print 2**24 * 2**24
Somewhere along the line, you must meet some minimum criteria for
using any given mechanism, and the mechanism itself may contain
"checking" of one kind or another. If I load two CPU floating
point registers with "random garbage" (whatever that means) and
then try to multiply them together, but the CPU throws a floating
point exception, is that type checking?
That's not right; that's not even wrong. -- Wolfgang Pauli
More information about the Python-list