The advantage of maps over records is if I have 3 objects as maps I can easily munge them into a single map. But if I have 3 objects as records, I loose that option. OK, I can nest records inside each other but it is not the same. With objects as maps I've got something closer to mixins. But not type based.
Hmm. Guess the mixins thing is the real advantage. But mixins into objects rather than extending a type with functions. Now I did find this: Function maps are maps of the keywordized method names to ordinary fns - this facilitates easy reuse of existing fns and maps, for code reuse/mixins without derivation or composition The above was taken from http://clojure.org/protocols where it was talking about extend. It is very similar. But it is more about extending the polymorphic methods. While I'm talking about extending an object. And aggregating in additional data as well as methods. On Sat, Nov 21, 2015 at 12:29 AM, Timothy Baldridge <tbaldri...@gmail.com> wrote: > You might want to read up on records and protocols in clojure. This is > pretty much the use case for which they were designed. > > Timothy > > On Friday, November 20, 2015, William la Forge <laforg...@gmail.com> > wrote: > >> You can tell I'm still new to clojure. The composition should have been >> written like this: >> >> (-> opts (db-file-open) (db-cache-start) etc) >> >> -- >> 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. >> > > > -- > “One of the main causes of the fall of the Roman Empire was that–lacking > zero–they had no way to indicate successful termination of their C > programs.” > (Robert Firth) > > -- > 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 a topic in the > Google Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/N-UG4jh8FDY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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.