Hi Arnout, This is interesting, but may be a lot less useful than you think without filling in all the other methods that a normal map has. For instance, you cannot do an equality check with another map (no use of clojure.lang.MapEquivalence or implementation of equals and equiv), nor use it in a set or key in another map (no implementation of hashCode and hasheq), etc. etc. Unless you and everyone else using it is certain that every line of code in your application and the libraries you depend on don't do this, this is a ticking timebomb.
For an example of a full map implementation, it might be helpful to take a look at https://github.com/ztellman/potemkin/blob/master/src/potemkin/collections.clj, and will definitely be useful to run https://github.com/ztellman/collection-check against your map implementation. One issue that collection-check would uncover is the fact that the underlying LinkedHashMap that you're using has different key equality semantics than Clojure does, so calling (-> m (assoc 1 :foo) (dissoc 1N)) would likely break a bunch of stuff. Please don't be discouraged by this, making custom map-like data structures is much harder right now than it should be. I just want to make sure no one gets an unpleasant surprise in production somewhere down the line. Best, Zach On Monday, October 6, 2014 1:45:02 AM UTC-7, Arnout Roemers wrote: > > Thank you for your kind responses! I will look into writing a post that > shows what the motivation was (i.e. how I use it), how it works, and how it > compares to Prismatic's Graph. > > Cheers, > Arnout > -- 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.