Hacker News new | past | comments | ask | show | jobs | submit login

Please cut out the CL evangelizing. Go play with your muddle of Turing tarpits made of conses.



Oh, of course, cluttering the code with explicit conversion from one data-structure into another is a much better way, much more lines of code, bigger self-esteem, better salary. Java world.

There is an example (very clever, no doubts)

  (defn keywordize-map
    "Recursively convert maps in m (including itself)
     to have keyword keys instead of string"
    [x]
    (condp instance? x
     clojure.lang.IPersistentMap
     (for-map [[k v] x]
       (if (string? k) (keyword k) k) (keywordize-map v))
     clojure.lang.IPersistentList
     (map keywordize-map x)
     clojure.lang.IPersistentVector
     (into [] (map keywordize-map x))
     x))
btw, this code is really clever, while in typical clojure project there are tons of meaningless conversions.


So which True Lisp do you prefer that lacks analogues to the types used above (String, Keyword, List, Map, Vector) in which such a function wouldn't be applicable?

I know it's not a Common Lisp implementation. Most modern Schemes have equivalents. The only difference between Clojure and most Lisps in this case is that its collections are immutable. So how has Clojure sinned in this regard?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: