Side effect-free interface on top of a stateful library

Posted by beta on Programmers See other posts from Programmers or by beta
Published on 2013-11-07T13:49:12Z Indexed on 2013/11/07 16:11 UTC
Read the original article Hit count: 335

Filed under:
|
|
|

In an interview with John Hughes where he talks about Erlang and Haskell, he has the following to say about using stateful libraries in Erlang:

If I want to use a stateful library, I usually build a side effect-free interface on top of it so that I can the use it safely in the rest of my code.

What does he mean by this? I am trying to think of an example of how this would look, but my imagination and/or knowledge is failing me.

© Programmers or respective owner

Related posts about haskell

Related posts about erlang