News for hackers. Stuff that matters.
Re:“Mostly functional” programming does not work (2014) by davexunit on Monday June 22, 2015 @09:13AM (#9758033)
>Do you not know how to perform a specific task within functional code?

It's not that I didn't know, it's that the process was imperative at its core. For example, I am working on a rendering engine using OpenGL. The high-level scene graph interface is purely functional, but rendering such a scene graph is an imperative process: binding textures, vertex arrays, shaders, writing to a framebuffer, etc. This low-level rendering code is the functional runtime for the high-level API.

Re:“Mostly functional” programming does not work (2014) by TazeTSchnitzel on Monday June 22, 2015 @10:10AM (#9758400)
Ah, I see.

You could do that within a purely functional language (via monads), but given how locked to C and the imperative paradigm OpenGL is, it would make sense to simply write that in C, yes.

Re:“Mostly functional” programming does not work (2014) by davexunit on Monday June 22, 2015 @10:29AM (#9758535)
I think monads are orthogonal to this issue. Using a monad would provide a pure interface around the imperative stuff, but the imperative stuff would still be there. Someone's gotta write the gross stuff so that we can build our pleasant, pure world on top of it.