Why does Dynamic Typing really matter?!?

Jason Smith chastel_pelerin at hotmail.com
Thu Feb 6 23:01:18 EST 2003


Hi Daniel

Cheers, yes, Java performs a type check before assigning a class
created by reflection to a non-object typed reference, do u know if it
still performs a type check on Object typed references? I guess this
would be a implementation detail...I'm not familiar with XML to much
degree and will investigate what u have mentioned further.

Thanks again
J.

> 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