O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Programming Styles in Scala

Scala does not limit us to one programming style. We can program with objects, or in functional style, and also mix the two to get the best of both worlds.

Java programmers are familiar and comfortable with OOP. Scala is object-oriented and statically typed—a notch more than Java on both fronts. That’s good news since our investment over the years in OOP is not wasted but earns dividends as we begin to program in Scala. When creating traditional applications we can lean toward the OO style provided by Scala. We can write code much like the way we’re used to in Java, leveraging the power of abstraction, encapsulation, inheritance, and above all, polymorphism. At the same time, we’re not restricted to this model when ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required