On Wed, Feb 16, 2011 at 1:23 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:

> Just thinking out loud...
> After listening to "classes are a premature optimization" lecture on infoQ
> .. I was just wondering if the only purpose of defrecord is space&speed
> efficiency ... and could just use maps .. ofcourse .. I won't be able to use
> the protocols ..defrecord may improve the readability in terms of what keys
> to expect ..  Am I missing something?
> Sunil.
>

It's not just about space & efficiency. It is very much about
expressiveness. One promise that Clojure offers over other Lisps is that the
core data structures are built upon a rich set of interfaces. Until
deftype/defrecord/protocols arrived that was something of an empty promise -
you couldn't actually take advantage of this fact.

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

Reply via email to