4 ms·
The difficult thing about file I/O in Clojure is that there are not many Clojure primitives for doing it, except for slurp and duck-streams (which is only in co
by yason 17y ago
The difficult thing about file I/O in Clojure is that there are not many Clojure primitives for doing it, except for slurp and duck-streams (which is only in contrib): you actually have to learn a bit about Java and its interfaces and libraries. For example, line-seq takes a BufferedReader.
Clojure especially embraces interop with Java in favor of wrapping Java features into Clojure functions, so it's part of the official pain.
Can't say it was as easy as in Python but on the other hand, I can't say it hurts to know a bit Java, too. At least it's for a good cause :)
- deleted 17y ago[deleted]