Fun with Functions, and Never Having to Close That JDBC Connection

  • David Pollak

Abstract

We saw Scala functions in action in the last chapter. Passing functions to map and filter allowed us to write code that was more readable and understandable. The looping was done in the method, allowing our application code to be cleaner and easier to maintain. In this chapter, we’ll explore functions in more depth and learn about how functions allow us to encapsulate business logic and separate it from the imperative flow of control statements. We’ll write our own control structures, including looping and automatic JDBC connection closers that will lead to cleaner, better code.

Keywords

Sugar Eter Dispatch Ruby 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© David Pollak 2009

Authors and Affiliations

  • David Pollak

There are no affiliations available

Personalised recommendations