By Bedrytski, Aliaksandr; Bogucki, Janek; Detrich, Matthew de; Lacava, Alessandro; Neil, Benjamin

Professional Scala presents skilled programmers with speedy music insurance geared toward helping using Scala in expert creation functions. Skipping over the fundamentals and basics of programming, the dialogue launches without delay into functional Scala themes with the main updated insurance of the rapidly-expanding language and comparable instruments. Scala bridges the distance among sensible and object-oriented programming, and this booklet information that hyperlink with transparent a dialogue on either Java compatibility and the read-eval-print loop utilized in sensible programming. you will research the main points of tooling for construct and static research. You’ll disguise unit trying out with ScalaTest, documentation with Scaladoc, how to address concurrency, and masses extra as you construct the in-demand ability set required to take advantage of Scala in a real-world creation environment.

Java-compliant with sensible programming houses, Scala's attractiveness is transforming into quickly—especially within the speedily increasing components of massive facts and cluster computing. This booklet explains every thing expert programmers have to begin utilizing Scala and its major instruments fast and effectively.

 Master Scala syntax, the SBT interactive construct device, and the REPL workflow

  • Explore useful layout styles, concurrency, and testing
  • Work successfully with Maven, Scaladoc, Scala.js, and more
  • Dive into the complex kind system
  • Find out approximately Scala.js

A operating wisdom of Scala places you renowned. As either the language and functions extend, so do the possibilities for skilled Scala programmers—and many positions are going unfilled. Twitter, Comcast, Netflix, and different significant organizations throughout industries are utilizing Scala on a daily basis, in a few assorted purposes and capacities. Professional Scala is helping you replace your talents fast to begin advancing your career.

Show description

Read Online or Download Professional Scala PDF

Best object-oriented software design books

Java & XML: Solutions to Real-World Problems

With the XML ''buzz'' nonetheless dominating speak between net builders, there is a actual have to how one can lower during the hype and positioned XML to paintings. Java & XML indicates the right way to use the APIs, instruments, and methods of XML to construct real-world purposes. the result's code and information which are moveable. This moment variation provides chapters on complicated SAX and complicated DOM, new chapters on cleaning soap and knowledge binding, and new examples all through.

Data Structures for Computational Statistics

Because the starting of the seventies desktop is out there to take advantage of programmable desktops for numerous projects. throughout the nineties the has built from the massive major frames to private workstations. these days it isn't in simple terms the that's even more strong, yet workstations can do even more paintings than a prime body, in comparison to the seventies.

Object-Oriented Analysis, Design and Implementation: An Integrated Approach

The second one variation of this textbook contains revisions in keeping with the suggestions at the first version. In a brand new bankruptcy the authors supply a concise advent to the rest of UML diagrams, adopting an analogous holistic strategy because the first variation. utilizing a case-study-based strategy for supplying a entire creation to the foundations of object-oriented layout, it includes:A sound footing on object-oriented ideas similar to periods, items, interfaces, inheritance, polymorphism, dynamic linking, and so on.

Extra info for Professional Scala

Example text

Due to the limitations of JVM that can’t be avoided, the latter group will be disappointed with its capabilities. Those limitations are, however, outside of the scope of this chapter, because they are nonexistent for someone beginning this adventure in functional programming. IMMUTABILITY Programming languages have a different approach to immutability: some of them embrace it and don’t allow any mutable state, and others allow it only through constants that, arguably, are semantically different from a simple immutable value.

The solution to this problem is to extract side-effect free code into separate functions with meaningful names and keep them as small as possible. findAll() extractAdultUserNames(users) As you may see, in this oversimplified example, we refactored the extractAdultUserNames method so that it is now side-effect free. As a benefit, this method is now far less painful to test (no need to mock dao dependency injection); it may be used in concurrent structures (in a map() method of a parallel collection for example).

Here is its tail-recursive version: @tailrec def fibo(n: Int, a: Int = 0, b: Int = 1): Int = { if (n < 1) a else fibo(n-1, b, a+b) } It takes some time to understand how it works. indd 05/12/2016 Page 25 26 ❘ CHAPTER 2 FUNCTIONAL PROGRAMMING var second = 1 var i = 0 while( i < n ) { val result = first + second first = second second = result i = i + 1 } first } So, as a rule of thumb, when dealing with while in your code, try to see if there is an alternative using Collection API, which is discussed later in this chapter.

Download PDF sample

Rated 4.69 of 5 – based on 7 votes