https://www.cs.tufts.edu/~nr/cs257/archive/bill-pugh/jmm2.pd...
most other programming languages make excuses. Build system with dependency resolution that works (unlike Python) IDEs take advantage of static nature of language. Static nature of language enables refactoring.
Lambda syntax that's probably more concise than your favorite language. Implementation of Lambdas that meshes perfectly with existing practices in Java. All-virtual polymorphism is one of many ways that Java doesn't steal IQ points from you the way C#, C++ and languages like that do.
Thing is, they turned it around.
Some APIs were excessively verbose due to the lack of lambdas, which were emulated using anonymous inner classes.
If you have a link, please share.
This library contains a huge number of Iterables, each of which has at least one Iterator implementation.
https://github.com/paulhoule/pidove
It is convenient to let the Iterator be immutable and the Iterator be an inner class that gets its configuration information out of the Iterable.
(That said, if people really thought seriously about Iterator being a Supplier<Iterable> people might think more rationally about error handling. Also in a slightly parallel universe the Iterator would only have one method since remove() hardly ever gets used and having both hasNext() and next() methods is asking for bugs.)
This is how things like Babashka (Clojure CLI scripting runtime) are possible [0]
It's even possible to compile it ahead of time, making projects like a Clojure CLI scripting runtime with almost instant startup time possible (babashka).