I fail to see how it requires changing a lot of code. it just means
you need to change the place where you create your maps. which if you
are also type tagging them is a lot of repetitive code, so it should
already be factored out into a function, so then you just switch out
one function.

On Tue, Jan 19, 2010 at 3:59 PM, Andreas Wenger
<[email protected]> wrote:
> On 20 Jan., 00:56, Kevin Downey <[email protected]> wrote:
>> clojure structs are an optimized version of maps for a set of shared
>> keys. if you don't have a defined set of shared keys you just have a
>> map. so by all means, use a map
>
> You're talking about the implementation in the background, but I am
> talking about nice code.
> I'm aware that defstruct with optional keys introduce a slight
> overhead compared to normal hashmaps, but that is minimal and
> defstruct/struct-map is much cleaner and more documentary that a pure
> hashmap.
> I can not find a reason why Clojure forbids to make use of this nice
> feature.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to