November 2010
Intermediate to advanced
504 pages
12h 45m
English
We already know one reason why functional programming is crazy: Functional programs can’t really do anything, since they can’t have side effects. As Simon Peyton Jones, a well-known functional programmer, likes to say, “All you can do without side effects is push a button and watch the box get hot for a while.” (Which isn’t technically true, since even the box getting hot is a side effect.)
We’ve seen that we can work around this limitation of functional programming by adding a dirty section to our programs, which is kept separate from the rest of the code and contains all our code that is imperative and not in the functional style. However, recall the problem with the functional style: It can cause code to be ...
Read now
Unlock full access