One reason it might not be clear what I'm driving it is that in trying to create a minimalist example, I used grid dimensions, and in reality, you'd probably know right away to put something like that in a data structure, and pass it around to all your functions.
Try to imagine that at the beginning of your project, you really do believe that you're only going to ever be working with 3x4 grids, and then later, you realize that's not the case. In the early phase, it's very easy to construct a bunch of functions that all refer to those shared vars (in my example `rows` and `cols`). Later, when you realize rows and cols can change, making those names parameters is a major overhaul to the codebase. I believe that most Clojurians try to delay the refactoring by using `binding` to alter those vars. But that's a fragile strategy, and eventually the code typically needs to be rewritten. On Thu, Dec 26, 2013 at 7:04 PM, Mark Engelberg <mark.engelb...@gmail.com>wrote: > Does this OO pseudocode help clarify at all? > https://gist.github.com/Engelberg/8142000 > > On Thu, Dec 26, 2013 at 6:27 PM, Stuart Halloway < > stuart.hallo...@gmail.com> wrote: > >> Hi Mark, >> >> I am not following your example. Can you post (pseudocode fine) what a >> good OO impl would look like, and why Clojure's defrecords can't do >> something similar? >> >> Stu >> >> -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.