On Sun, Jul 22, 2012 at 8:54 PM, Warren Lynn <wrn.l...@gmail.com> wrote:
> Could you elaborate a little bit more? I know there is a chart, but the
> chart does not tell you why.

Hmm, I thought the flowchart gave pretty good reasons, sorry :(

Records aren't as flexible and you'll lose the type anyway when
general map operations are run on them. For example, (into {} (map
something my-record)) - and you can't construct an empty record, the
declared fields must be present, and your type bleeds into a lot of
aspects of your code so it's much less generic (with map->MyRecord
calls and MyRecord. constructions, for example).

That sort of thing hardly ever makes sense for the type of problems I'm solving.

Per the flowchart, if I needed to interop with Java and represent
domain objects in Java or I needed protocol dispatch on specific
types, I'd use defrecord or deftype. But I don't need those features
so I stick with generic Clojure data types - maps and vectors and
sets.

Hope that clarifies?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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

Reply via email to