Why does Dynamic Typing really matter?!?

Daniel Dittmar daniel.dittmar at sap.com
Thu Feb 6 13:06:54 EST 2003


Kaz Kylheku wrote:
> "Daniel Dittmar" <daniel.dittmar at sap.com> wrote in message
> news:<b1thjl$phm$1 at news1.wdf.sap-ag.de>...
>> 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.
>
> This is an atrocious stupidity of XML, not an advantage of dynamic
> typing.
>
> If XML was designed by intelligent people, its data elements would be
> properly typed, so the parser would put out strings, integers,
> symbols, lists, vectors, complex numbers, floats, rationals, etc.

This is just the point. When the programming language does not support
dynamic types, then there are three choices of accessing these values:
- compile the schema into the program (sometimes called data binding)
- return an abstract type and let the application do a downcast after a type
query (poor man's dynamic typing)
- have special accessor methods for every possible type (the JDBC approach),
which is only useful if the programmer has an idea on what the types will be
at run time (poor man's data binding)

Daniel







More information about the Python-list mailing list