> I'm pretty sure structs are only appropriate for when you need to eek > the absolute last iota of performance out of a collection, in which case > they can provide greater speed than maps. But since the list of keys is > fixed, it means it's more effort to add or rename a key than it is with > a map.
Not really, I can assoc and dissoc as I wish and leave blank values I wish. Any function can treat it as a map. > You shouldn't trade that flexibility for speed until (0) you are pretty > sure the keys are not going to change soon and (1) you know you can't > get the speed you need from maps. Neither of these are true when you're > just starting out on a piece of code. I don't use it for performance reason but for semantic ones. For instance, in my code, I have: (defstruct polygon :points :color) This line tells me when I reread that polygon is significant concept and that its attributes should be points and color. I'm relatively confident this isn't going to change soon and if it does, I'll just have to change the defstruct and the places that create polygons. Not a significant burden. Even if there was not performance implications, I'd use structs. However, that might be the wrong thing to do so that's why I'm asking. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---