On Sep 5, 8:46 am, Terje Dahl <te...@terjedahl.no> wrote:
> Ref:  Stuart Halloway's talk: "Simplicity":
>
> http://blip.tv/clojure/stuart-halloway-simplicity-ain-t-easy-4842694
>
> Found via reading list:http://clojure.com/reading.html)
>
> At one point in his talk he states that defrecord is in fact basically
> "documented, named [typed] structure".
> (as opposed to a standard map).
> This I thought was quite genius.
>
> But on further reflection I wonder if:
>
> A: Doesn't this contradict another Clojure rationale:
> "It is better to have 100 functions operate on one data structure than
> to have 10 functions operate on 10 data structures." - Alan J.
> Perlis  http://clojure.org/rationale
The types created by defrecord implement the same interfaces as maps,
so they can be used as maps.

> B: Is this not a form of optimization - (which may be premature)?
If you are going to be defining protocols that work with your domain
constructs, using a defrecord type from the start wouldn't be
premature.

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