by agumonkey · 7y ago · 0 comments
I actually spend way more time finding out what java objects can do than clojure. The only reason java programmers don't feel this is because someone wrote code to check/suggest what they just wrote. Try writing java without an IDE.
ps: and I'd add that simple set of immutable structures plus functional idioms filters a lot of ambiguity from programming too. The other day I had to read java sax attribute API. It was not obvious and a complete waste of time all that for a list of pairs.
Why?
The availability of powerful IDEs is one of the biggest selling points of Java, arguably topped only by portability and the large ecosystem of libraries. The fact is, if you're writing Java, you will almost certainly be using tools that help you write correct code more quickly.
And the nature of Java is what makes that possible. The IDE knows what your data means, and it knows if you're trying to do something that isn't allowed. That's the entire point of the article: Java forces you to declare what you're trying to do, the IDE holds your hand through that, and the compiler enforces it.
OTOH, they support tooling that can, used properly, though that tooling itself increases the surface and scope that needs to be learned and accessible in using the language. (And often is less helpful than it should be, because if it often takes more what is necessary for code to function to make discovery useful, but that involved the kind of documentation lots of people avoid.)
And again, the point is not that dynamic => uncertainty it's that static != certainty. It's static + man hours that reduce some uncertainty.
ps: remember the stubs of code in the Eclipse/UML era... that was tooling too. We got to be a little more precise.
But why would I ever want to?
If you get a Request object, how do you know what is in it ? the IDE is telling you, not the language.
I'm even pretty sure that until a decade ago, Emacs had a more grammatical understanding of source code than Visual Studio.