Earlier quoted context omitted.
Java will happily let you fill a list or hash with objects that could be of any type yet it is generally the quintessential blub language.
No, it doesn't. Elements of a Java collection must all be of the same type. The elements may be implicitly coerced to a common supertype, but if you want to get the original types back you have to downcast--which is basically explicit dynamic typing.
ArrayList myList = new ArrayList(new Object[] { "foo", 42, new Bar() });
for(Object elem : myList) {
if(elem instanceof String) doStringThing((String) elem);
else if(elem instanceof Number) doNumberThing((Number) elem);
else if(elem instanceof Bar) doBarThing((Bar) elem);
else doObjectThing(elem);
}
Or you could keep elements as Objects until you needed to perform a specific operation on them, then cast at the site and perform the operation, letting the ClassCastException propagate if you're wrong. This is basically what Arc does.