3 ms·
This is in the case when the program is pure-clojure. In my case, I'm trying to bring some Clojure into an existing project with a sizable Java codebase. Anyw
by guard-of-terra 15y ago
This is in the case when the program is pure-clojure.
In my case, I'm trying to bring some Clojure into an existing project with a sizable Java codebase.
Anyway, I think that your clojure code would use String. Or joda's DateTime and zillion other brilliantly useful classes. It's not practical to either wrap or rewrite all the Java richness.
Concerning your example: Clojure also does a good work of inferring types given a few type hints, and that I good use. Just a few hints, a great speed up.
- swannodette 15y agoWe can agree to disagree. You have clojure.string. For Joda DateTime you have clj-time. There are a growing number of Clojure libraries that provide an idiomatic interface to Java functionality w/o resorting to pervasive type-hinting.