On 22/03/12 11:03 AM, Joe Pluta wrote:
Using a dynamically typed language is more like coding all the variables
in your Java program as type Object and just dumping whatever you want
into them, hoping nobody changes it.

There are arguments on both sides of the interpreted versus compiled OO language debate. Compiled OO languages tend to accumulate a lot of syntactic cruft, such as generics, just because the compiler wants to know the types at compile time. But in a true OO environment, the best you can do is to say that an object satisfies some interface.

Interpreted OO languages are, of course, strongly typed. If an object does not have some attribute at run-time, you get an error. I've done Java programming way back before the days of generics, and I certainly remember getting my share of class exceptions. And I've gotten class exceptions doing C# programming. And I've had to endure lots of frustration getting my Java or C# code to pass the compiler!

In practice, I really don't see a lot of class exceptions doing Python or PHP programming. In an interpreted OO language (like Python or PHP), what matters is if the object has the right attribute at the right time during the running of the code.

Joe, I understand fully the theory behind strong, compile-time type checking. But in practice, the interpreted OO languages have the edge. The language does what you want more easily without having to fight the tools.

Cheers! Hans

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].