Skip to Content
Mastering Functional Programming
book

Mastering Functional Programming

by Anatolii Kmetiuk
August 2018
Intermediate to advanced
380 pages
10h 2m
English
Packt Publishing
Content preview from Mastering Functional Programming

Encapsulation

One problem with concurrent programming is the shared mutable state. Akka eliminates this problem by providing a restriction that it is impossible to access your actors as ordinary objects. This means your business logic does not have a single variable that would store an actor. Hence, it is impossible to access the values defined on the actors by ordinary object-oriented means.

The actors are exposed to the outer world via proxy types—ActorRefs. The Akka library defines this type, and only safe operations are permitted on an actor.

If you want to do something with an actor, you should do so via this proxy. Also, you do not instantiate an actor as an ordinary Java or Scala object. You do not call a constructor on it. Instead, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781788620796Supplemental Content