When I first started learning Java, I had no idea 13 no idea 13 just how much Java owed to Smalltalk! I still didn 19t really appreciate it until recently, when I started digging into Smalltalk more seriously. From the notion of everything descending from 1CObject 1D to garbage collection to the inheritance model to polymorphism, almost everything Java does is basically aping Smalltalk. Often not very well. I am using Java 19s Collections a lot, and even though Collections are a relatively new transplant from Smalltalk, compare this:
for (Iterator iter = myList.iterator(); iter.hasNext(); ) {
myThing thing = (myThing) iter.next();
thing.doSomething();
}
with this
myList do: [:thing | thing doSomething ]