Chapter 14. Sharing mutable state with actors

This chapter covers

  • Understanding the actor model
  • Using asynchronous messaging
  • Building an actor framework
  • Putting actors to work
  • Optimizing actor performance

In working through this book, you first learned that functional programming often deals with immutable data, which results in programs that are safer, more reliable, and easier to design and scale. Then you learned how mutable state can be handled in a functional way by passing the state along as an argument to functions. You saw several examples of this technique:

  • Passing the generator while generating random numbers allowed for increased testability.
  • Passing the console as a parameter allowed you to send functional output to the ...

Get Functional Programming in Java: How functional techniques improve your Java programs now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.