Hi Ambrose, Thanks for the advice. I have already implemented my application using maps (defstruct) and busy evaluating whether I should switch to records. I like the idea of using records and protocols to help me to define strict abstractions and to do easy type dispatch. On the other hand I can see that they reduce flexibility. I will post some code to show what I am trying to do...
Cheers, David On 30 April 2011 12:39, Ambrose Bonnaire-Sergeant <abonnaireserge...@gmail.com> wrote: > Hi David, > I can only comment on a subset of your post. > Records can be cumbersome to work with during early stages of development, > when > everything is rather volatile (when isn't it?). > You might like to try using maps instead. They are easier to work with when > you are > working out what properties you need in your records. It's also > straightforward to convert > from maps to records. > Of course there are downsides to this (speed, lack of types) but it can be a > useful strategy. > Thanks, > Ambrose > On Sat, Apr 30, 2011 at 4:46 PM, David Jagoe <davidja...@gmail.com> wrote: >> >> G'day everyone, >> >> Are there any libraries or projects that are similar to Python Traits >> or Zope Schemas (http://pypi.python.org/pypi/zope.schema) for clojure. >> I am developing a compojure application and there is a lot of >> duplication between areas of the codebase, e.g. >> >> - Fields listed on the defrecords >> - Fields listed on the public constructor function >> - Fields listed on forms and again on handlers >> >> So it is a lot of effort to e.g. add a new field to the data model. I >> would like something declarative from which I can generate forms, >> validators etc. >> >> >> Cheers, >> David >> >> -- >> 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 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 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