Why does Dynamic Typing really matter?!?

Daniel Dittmar daniel.dittmar at sap.com
Thu Feb 6 12:40:37 CET 2003


Jason Smith wrote:
> But what I want need is an solution to a problem that would not be
> possible to replicate in a statically typed language...

Reflection: calling a method with a specific name of an object whose type is
unknown at compile time.
You might say that Java is a statically typed language and allows this. But
this is implemented by using the Object class for most values, thus backing
out to dynamic types.

SQL programming: in most languages, you cannot specify the types of columns
of a specific SELECT. Again, Java resorts to either the Object class or by
pushing the responsability to the programmer who has to choose a specific
type (ResultSet.getInt) which may fail at runtime.

XML: all data in an XML file or a DOM is of type string, but the schema may
specify that it is really an integer.

You could extend programming languages to be SQl or XML schema aware. But
then you'd lose much of the flexibility for which SQL and XML were choosen
in the first place.

Daniel









More information about the Python-list mailing list