On Oct 21, 4:25 pm, Ulises <ulises.cerv...@gmail.com> wrote: > > c) Put actor identities inside the world state - nasty! now the world > > state is mutable........ > > Not necessarily (and I'd be interested in the replies)? > > I mean, here's how I view it. If actors are part of the world, then > they are part of its state. Hence, when the state of an actor changes, > the state of the world changes. If we accept this, then there's > nothing wrong with keeping the state of the 'world' and that of the > actors in a single data structure (albeit a potentially massive one) > and call this the new world (or universe). If you have the appropriate > functions for finding an actor inside the universe and updating it, > then you should be good to go.
Are you arguing for my option b) then? In which case actors don't have distinct identities, they are just part of the overall world? I'm probably leaning towards this option myself, though it seems a little uncomfortable that the solution boils down to "put everything in one big ref". Also, if you then create some kind of "multiverse" with multiple worlds then following the same logic you need to refactor everything to have one big ref for the multiverse with multiple worlds contained within it. i.e. it doesn't seem to compose neatly....... -- 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