Re: [im]mutability, threads, state and idiom

2010-01-17 Thread Timothy Pratley
2010/1/16 Simon Brooke : > general case of a cyclic directed graph. Surely there must be some > clean idiomatic way of creating a cyclic graph? I experimented with something very similar when I first encountered Clojure: http://clojure.googlegroups.com/web/funmud.clj And ended up representing the

Re: mutability, threads, state and idiom

2010-01-15 Thread Simon Brooke
On 15 Jan, 17:40, Laurent PETIT wrote: > Simon, > > To be very clear, and incite you to watch all those videos and read > all this material: > > One of the key motivations (if not the primary) of Rich writing > clojure has been constructing a language which would offer built-in > semantics to mana

Re: mutability, threads, state and idiom

2010-01-15 Thread Raoul Duke
On Fri, Jan 15, 2010 at 7:58 AM, ataggart wrote: > And a neat series showing how games which look imperative can be bent > to be (mostly) functional: > http://prog21.dadgum.com/23.html i find it interesting that there are so many drastically different approaches cf. http://world.cs.brown.edu/ si

Re: mutability, threads, state and idiom

2010-01-15 Thread Laurent PETIT
Simon, To be very clear, and incite you to watch all those videos and read all this material: One of the key motivations (if not the primary) of Rich writing clojure has been constructing a language which would offer built-in semantics to manage state change over time. So you're really in the ri

Re: mutability, threads, state and idiom

2010-01-15 Thread ataggart
Also check out Rich's video covering concurrency, and in particular his Ants program: http://blip.tv/file/812787 For more on state stuff: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey And a neat series showing how games which look imperative can be bent to be (mostly) functional

Re: mutability, threads, state and idiom

2010-01-15 Thread Meikel Brandmeyer
Hi, On Jan 15, 4:25 pm, Simon Brooke wrote: > Right, I'm trying to get my head around the consequences of > Opinions? You have to distinguish between identity and state. Disclaimer: I have no clue whatsoever about game design. The different rooms are identities, the different players are iden

Re: mutability, threads, state and idiom

2010-01-15 Thread ataggart
On Jan 15, 7:25 am, Simon Brooke wrote: > So, there seem to be four possibilities > > (1) I've chosen the wrong language for the problem, or vice versa; > (2) There is some idiomatic means of managing mutable state which I've > missed; > (3) The right solution is to create a hybrid system using

[im]mutability, threads, state and idiom

2010-01-15 Thread Simon Brooke
Right, I'm trying to get my head around the consequences of immutability for the sort of programming practices I'm used to, and how I change the way I do things to fit in with it. Initially I thought 'well, immutability just means you can't use rplaca and rplacd, and I've very rarely used either so