
On Wed, 13 Aug 2008 14:14:46 +0100, "Chaddai Fouche"
2008/8/13 Bayley, Alistair
: First, monad /= imperative It is important to establish this distinction which doesn't seem to be very clear in some minds...
I think Matthias Felleisen probably understands this, but I could be wrong...
I think so too, but we're on Haskell-beginners and the formulation was much too ambiguous to let it pass, I would prefer that beginners in Haskell don't start with the idea that Monad are always imperative, it's already too current a misunderstanding.
Can you recommend any specific examples to illustrate this point to a programmer/educator from a Scheme background arguing that specific libraries in world.ss are more functional than the monadic examples for animations in SOE? If possible, I would like to write a rebuttal to his claim, using specific examples.
I had a quick scan of the SOE source and it looks as though all of the graphics operations are in IO (). I don't see why you couldn't rearrange it so that describing shapes was purely functional, while rendering was still IO () (required by OpenGL, I assume), but it looks like it could be quite a bit of work.
That's unfortunate. Of course IO (or some FRP hiding the IO) is still required to do the rendering, but it would be much nicer to split those concerns.
That's probably the point that Felleisen was addressing. If functions have any side-effects, then they aren't purely functional, but in order to perform rendering, side-effects would be necessary in both Haskell and Scheme, so this can't be his point. Therefore, he must be referring to other functions written in a more purely functional style in world.ss than in SOE. In order to address his point, they would probably be need to be rewritten in a purely functional style. -- Benjamin L. Russell