Scala combining functionality with object-oriented

If you were trying to explain to someone how beautiful Scala combines functional and object-oriented methods, what example would you use?

+5
source share
3 answers

In my canned Refused discussion of Scala , I end up with an example of an Actor who uses functional style pattern matching to determine the "look" of a received message and polymorphically send an object-oriented style for one of the "views" of the message (geometric shape for drawing). It starts around slide 76.

+4
source

API - , . Map , Function1

+1

PartialFunction , OO/FP . , , , , . , ; , , - .

+1

All Articles