On Mar 4, 2017 3:52 PM, "Gregg Reynolds" <d...@mobileink.com> wrote:
On Mar 3, 2017 6:27 PM, "John Newman" <john...@gmail.com> wrote: I think the path navigator DSL feels slightly un-Clojurey. But other than that, I think Specter is pure magic and Nathan is right that editing deeply nested data structures in Clojure is a point of deficiency, especially for people coming from mutable languages/data structures. To that extent, I think Specter does a yeoman's job of filling that "missing piece" of Clojure. Again, it's only the navigator DSL that feels a little un-Clojurey to me. +1. the functionality is great, but the api imho is not just a little unclojurish, it's massively unclojurish. MAP-VALS? END? No way, for me at least. Specter is a specific solution to a general problem. all such solutions will probably boil down to more or less the same thing, implementation-wise. but the interface makes all the diff. for example, it's easy to imagine a more xsl-like (or even css-like) syntax with the same functionality. more to the point, imho everything specter is doing could be expressed in a more naturally clojure idiom. for example, let's take the first example at , https://github.com/nathanmarz/specter/blob/master/README.md, which amounts to "apply f to every value in a map structure, at every level". this would be a good thing to have. essentially, update-in with wildcards. sth like (update-in-v* m even? inc) would do quite nicely, i think. update-in-v means map values (as opposed to update-in-k) the * makes it recursive, even? is the predicate that selects values, inc is the fn to apply. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.