On Fri, Nov 12, 2010 at 9:15 AM, Albert Cardona <sapri...@gmail.com> wrote: > Hi Eric, > > Your neural network DSL looks great. One minor comment: why use lists > instead of sets? In the webpage you state: > > "Lists are used to represent a unordered series" > > ... but lists are generally considered data structures whose elements > are accessible by index. The closest representation to an unordered > series is a set. > > Just my two cents.
Which data structure to use depends on a lot of your requirements, not just the conceptual nature of the data. Here's a rough breakdown: Lists: efficient traversal, efficient add/drop at start, can contain duplicates Vecs: efficient traversal, efficient add/drop at end, efficient indexed access, efficient "mutate" in middle, can contain duplicates Sets: efficient contains?, efficient add/drop any element, efficient avoiding of duplicates In this case, if his "sets" are traversed frequently but contains? and dropping of arbitrary members are not needed, nor efficient prevention of duplicates, then lists might make more sense. If he actually needs to have duplicates then sets are right out. -- 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