4 ms·
> I've been using Clojure happily for years without needing to dip into Java for anything other than something like parseInt() You needed to dive into Java to
by amelius 10y ago
> I've been using Clojure happily for years without needing to dip into Java for anything other than something like parseInt()
You needed to dive into Java to figure out something as basic as parseInt?
- cutler 10y agoI said "dip into", not "dive into" and by dip into I meant discovering I needed Java rather than a Clojure function.
- amelius 10y agoI didn't mean to offend you. I don't know Clojure or Java, and was just wondering why you need to look into the internals of Clojure for something as basic as parseInt.
- jakebasile 10y agoClojure.core doesn't have a parse integer function. You use Java interop to get one. It's as simple as '(Integer/parseInt "42")'
- puredanger 10y agoYou can use the built-in read-string too to generically read a string as Clojure data: `(read-string "42")`
- oxyclean 10y agoThe function is simple enough that clojure doesn't make its own wrapper for it, so you wind up doing this: (.parseInt Integer x) That may be what he means by dive into Java.