Hi Stuart -

I am very much still learning Clojure and havent waded into defrecord,
etc.

Could you provide an example of how you wold start with a map and
shift to a defrecord in the future?

Thanks

Base

On Feb 18, 11:16 am, Stuart Sierra <the.stuart.sie...@gmail.com>
wrote:
> One purpose of defrecord was to be interchangeable with maps, so that you
> can prototype with maps, then switch to defrecord for better performance
> without changing much code.  If you use constructor functions to create
> instances of your records/maps, you hardly have to change anything at all.
>
> Another purpose of defrecord (and deftype) is to support new types that
> implement protocols.
>
> Defrecord adds real type information to maps (accessible through the `type`
> function) but this was already possible with metadata.
>
> -Stuart Sierra
> clojure.com

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