RE: [Haskell-cafe] RE: [Haskell] Making 'Super Nario Bros' in Haskell

2008-10-29 Thread Eli Ford
> > Is there a better way than IORefs > > > The state Monad. Do you mean one state shared among all actors, like this? type MGame = State GameState newtype GameState = GameState { } That gets part of the way, but I'm thinking of a situation where each instance of a particular ty

[Haskell-cafe] RE: [Haskell] Making 'Su per Nario Bros.' in Haskell‏

2008-10-29 Thread Eli Ford
That’s great -- easy to follow, even though I can’t read the comments. ^^ It’s not possible for actors to ‘watch’ each other in this system, correct? For instance, if one actor holds a reference to another, it will keep that old version of the actor alive, but it won’t see when the actor mo

RE: [Haskell-cafe] computational overhead of the "data" declarations

2008-10-28 Thread Eli Ford
> So, to answer your question, the only computational overhead with a > data declaration is the extra memory and time to store and process the > constructor tags. It usually isn't noticeable, but sometimes the > difference can be important. Is there also potentially overhead due to laziness? I m