There was a similar question just asked recently: Dynamic vs Statically typed languages for websites
To restate the core of my answer:
As systems grow bigger, statically
typed languages ensure robustness at
component level and thus flexibility
at system level.
Yes, Java is strictly typed and yes, Java sucks (no offense. it's awful. great platform & ecosystem, but one of the worst languages ever (actually being used)).
But infering from that, that strict typing sucks is just a fallacy. It's like pointing at PHP and infering dynamic typing sucks (again, no offense. it's slowly improving, I give you that).
Personally, I do most of my development in haXe, which has a static type system. Not only is it signifficantly more expressive, than that of Java and does it require much less effort due to type inference, but it's also optional. Should it ever get in your way, you just bypass it.
Type safety is a feature (this is something many supposedly high level languages don't get right) to help you prevent shooting yourself in the foot.
And about any succesfull dynamically typed language would be simply better, if you had the option have your code type checked at will.
For example, I certainly enjoyed experimenting Ruby, but that was mostly because Ruby is fully object oriented, which is entirely orthogonal to the presence of a compile time type system.
I think the claim, that static type systems are obstrusive is merely based on lack of knowledge of good static type systems. There's a number of languages that do it right, haXe being one of them, and arguably not even the best in that regard.
Example haXe code:
class Car {
public function new();
public function wroom() trace('wroooooooom!')
}
class Duck {
public function new();
public function quack(at) trace('quackquack, ' + at + '!')
}
function letQuack(o) o.quack();
letQuack(new Car());
letQuack(new Duck());
This will produce a compile time error:
Car should be { quack : Void -> Unknown<0> }
Car has no field quack
For function argument 'o'
Duck should be { quack : Void -> Unknown<0> }
Invalid type for field quack :
to : String -> Void should be Void -> Unknown<0>
For function argument 'o'
You can't really claim I had to put a lot of effort into type safety.
Saying that you don't need type safety, because you have tests is even more idiotic. Writing tests is boring and repetitive. And I really don't want to write a test, just to find out, that an instance of Car won't quack and a Duck needs someone to quack at.
At the end of the day, you will find, no matter how much overhead type safety costed you, it is eventually ammortized (even in Java - although maybe not that soon).
JavaorC#would be inconclusive, their way of providing it is NOT the only one... – Matthieu M. Mar 18 '11 at 18:49