I think about it as extracting a subset, and I don't particularly expect the subset container to have the properties of the original container - similar to keys or vals (and different from filter). Neither of these perspectives is right or wrong, but the presence of more than one leads me to believe that "intuitive" is dependent on the brain of the beholder in this case. :)
>From the perspective of "extraction" I feel like select-keys on a record returning a record feels even weirder to me. None of this is to say that I am correct, just sharing my opinion. :) On Friday, November 1, 2013 2:18:33 PM UTC-5, puzzler wrote: > > On Fri, Nov 1, 2013 at 11:20 AM, Alex Miller > <al...@puredanger.com<javascript:> > > wrote: > >> I'm not sure I agree with the intent of the patch (as I can certainly >> imagine times when I'd want a pure map from select-keys, not one that has >> the characteristics of the source map). >> > > I'm sure it's possible to imagine both needs, but if you have have a > sorted-map, and you do a select-keys, don't you think the "principle of > least surprise" is for it to stay a sorted-map? I think intuitively, > select-keys is about *restricting* the existing map in some way -- you > expect things like the metadata and the type of the map to stay the same. > Similarly, my intuition tells me that if you want a new kind of map, you'd > have to "pour" the contents of the map into the other type of map via into. > -- -- 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/groups/opt_out.