O'Reilly logo

Scala for Java Developers: A Practical Primer by Toby Weston

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

© Toby Weston 2018
Toby WestonScala for Java Developershttps://doi.org/10.1007/978-1-4842-3108-1_15

15. Faking Language Constructs

Toby Weston
(1)
London, UK
 
Scala allows you to write your code in such a way as to give the impression that you’re working with native language constructs , when really you’re just working with regular methods.
This chapter will cover the following:
  • How Scala allows you to use curly braces instead of regular parentheses when calling methods.
  • How Scala supports higher-order functions: functions that take functions as arguments and return functions as results.
  • How Scala supports currying out of the box.
These things don’t sound that impressive, but combined they allow for a surprising amount of flexibility. We’ll see how these ...

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