Hi Clojure Users, while reading through http://natureofcode.com/book i tried to implemented some of the samples in clojure. One of them implements a sample ParticleSystem and uses Polymorphism to model state an behavior of different ParticleTypes. I have come up with this two solutions
Solution I https://gist.github.com/4162304 Solution II https://gist.github.com/4162692 But i am not really content with both of them. I thought about using the Universal Design Pattern and Multimethods as described in "The Joy of Clojure" Page 183 ff but then i give up the Abstractions represented by Protocols and get multiple Multimethods that are related in some unintuitve way. What i would like to have is a Solution that combines Protocols with JavaScript-like Prototyping. Solution I and Solution II try to take that way but my senses are that there might be more idiomatic solutions. Any thoughts or better solutions ? thanks & have a successful time -- 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