Late realization: you can use clojure with Java. Not with Java. For Java. We all know clojure java interop is good, but that's not what is at play(sic). See, Java is verbose (duh), compiled (duhbl) and mute. On the other hand, clojure, being a lisp with a repl, is real-time, short and generic, and doesn't even require `print` to inspect values most of the time. So instead of writing long main println-full methods, compiling, running, parsing the output ... you just import some java classes and start poking around. Frustration: gone. Even better, clojure is human friendly, has clojure.reflect/reflect to inspect classes and/or instances; clojure.pprint/pprint for quick formatting needs. If java bytecode came with docstrings and javadoc... clojure repl would be a better IDE than Eclipse. And it's probably a few lines away to scrape some remote or local html set and get going. People probably delegate that to manual browsing or a text editor extension. Anyway, my java project makefiles [1] have now a `repl:` rule to enjoy Java without Java (sorry dude).
[1] yes, I like IDE-free projects so a makefile with a few rules. I even learned about jdb, because yeah, text mode java debugging !
Aucun commentaire:
Enregistrer un commentaire