Categories
Bibliography Scala Software Engineering

Scala for the Impatient, 2nd Edition – B01MR67YSO ISBN-13: 978-0134540566, 2016

See: Scala for the Impatient, 2nd Edition, by Cay Horstmann, Publisher ‏ : ‎ Addison-Wesley Professional; 2nd edition (December 28, 2016)

Fair Use Source:

Interest in the Scala programming language continues to grow for many reasons. Scala embraces the functional programming style without abandoning the object-oriented paradigm, and it allows you to write programs more concisely than in Java. Because Scala runs on the JVM, it can access any Java library and is interoperable with familiar Java frameworks. Scala also makes it easier to leverage the full power of concurrency.

Written for experienced Java, C++, or C# programmers who are new to Scala or functional programming, Scala for the Impatient, Second Edition, introduces the key Scala concepts and techniques you need in order to be productive quickly. It is the perfect introduction to the language, particularly for impatient readers who want to learn the fundamentals of Scala so they can start coding quickly. It doesn’t attempt to exhaustively list all the features of the language or make you suffer through long and contrived examples. Instead, carefully crafted examples and hands-on activities guide you through well-defined stages of competency, from basic to expert.

This revised edition has been thoroughly updated for Scala 2.12 and reflects current Scala usage. It includes added coverage of recent Scala features, including string interpolation, dynamic invocation, implicit classes, and futures. Scala is a big language, but you can use it effectively without knowing all of its details intimately. This title provides precisely the information that you need to get started in compact, easy-to-understand chunks.

Get started quickly with Scala’s interpreter, syntax, tools, and unique idioms

Master core language features: functions, arrays, maps, tuples, packages, imports, exception handling, and more

Become familiar with object-oriented programming in Scala: classes, inheritance, and traits

Use Scala for real-world programming tasks: working with files, regular expressions, and XML

Work with higher-order functions and the powerful Scala collections library

Leverage Scala’s powerful pattern matching and case classes

Create concurrent programs with Scala futures

Implement domain-specific languages

Understand the Scala type system

Apply advanced “power tools,” such as annotations, implicits, and type classes

Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.



Resources

Purchase book: http://www.informit.com/title/9780134540566

About the Author

Cay S. Horstmann is principal author of Core Java®, Volumes I & II, Tenth Edition (Prentice Hall), as well as a dozen other books for professional programmers and computer science students. He is a professor of computer science at San Jose State University and a Java Champion.

Table of Contents:

  1. About This E-Book
  2. Title Page
  3. Copyright Page
  4. Dedication Page
  5. Contents
  6. Foreword To The First Edition
  7. Preface
  8. About The Author
  9. Chapter 1. The Basics
  10. 1.1 The Scala Interpreter
  11. 1.2 Declaring Values and Variables
  12. 1.3 Commonly Used Types
  13. 1.4 Arithmetic and Operator Overloading
  14. 1.5 More about Calling Methods
  15. 1.6 The apply Method
  16. 1.7 Scaladoc
  17. Exercises
  18. Chapter 2. Control Structures And Functions
  19. 2.1 Conditional Expressions
  20. 2.2 Statement Termination
  21. 2.3 Block Expressions and Assignments
  22. 2.4 Input and Output
  23. 2.5 Loops
  24. 2.6 Advanced for Loops
  25. 2.7 Functions
  26. 2.8 Default and Named Arguments
  27. 2.9 Variable Arguments
  28. 2.10 Procedures
  29. 2.11 Lazy Values
  30. 2.12 Exceptions
  31. Exercises
  32. Chapter 3. Working With Arrays
  33. 3.1 Fixed-Length Arrays
  34. 3.2 Variable-Length Arrays: Array Buffers
  35. 3.3 Traversing Arrays and Array Buffers
  36. 3.4 Transforming Arrays
  37. 3.5 Common Algorithms
  38. 3.6 Deciphering Scaladoc
  39. 3.7 Multidimensional Arrays
  40. 3.8 Interoperating with Java
  41. Exercises
  42. Chapter 4. Maps And Tuplesqueue
  43. 4.1 Constructing a Map
  44. 4.2 Accessing Map Values
  45. 4.3 Updating Map Values
  46. 4.4 Iterating over Maps
  47. 4.5 Sorted Maps
  48. 4.6 Interoperating with Java
  49. 4.7 Tuples
  50. 4.8 Zipping
  51. Exercises
  52. Chapter 5. Classesqueue
  53. 5.1 Simple Classes and Parameterless Methods
  54. 5.2 Properties with Getters and Setters
  55. 5.3 Properties with Only Getters
  56. 5.4 Object-Private Fields
  57. 5.5 Bean Properties
  58. 5.6 Auxiliary Constructors
  59. 5.7 The Primary Constructor
  60. 5.8 Nested Classes
  61. Exercises
  62. Chapter 6. Objectsqueue
  63. 6.1 Singletons
  64. 6.2 Companion Objects
  65. 6.3 Objects Extending a Class or Trait
  66. 6.4 The apply Method
  67. 6.5 Application Objects
  68. 6.6 Enumerations
  69. Exercises
  70. Chapter 7. Packages And Importsqueue
  71. 7.1 Packages
  72. 7.2 Scope Rules
  73. 7.3 Chained Package Clauses
  74. 7.4 Top-of-File Notation
  75. 7.5 Package Objects
  76. 7.6 Package Visibility
  77. 7.7 Imports
  78. 7.8 Imports Can Be Anywhere
  79. 7.9 Renaming and Hiding Members
  80. 7.10 Implicit Imports
  81. Exercises
  82. Chapter 8. Inheritancequeue
  83. 8.1 Extending a Class
  84. 8.2 Overriding Methods
  85. 8.3 Type Checks and Casts
  86. 8.4 Protected Fields and Methods
  87. 8.5 Superclass Construction
  88. 8.6 Overriding Fields
  89. 8.7 Anonymous Subclasses
  90. 8.8 Abstract Classes
  91. 8.9 Abstract Fields
  92. 8.10 Construction Order and Early Definitions
  93. 8.11 The Scala Inheritance Hierarchy
  94. 8.12 Object Equality
  95. 8.13 Value Classes
  96. Exercises
  97. Chapter 9. Files And Regular Expressionsqueue
  98. 9.1 Reading Lines
  99. 9.2 Reading Characters
  100. 9.3 Reading Tokens and Numbers
  101. 9.4 Reading from URLs and Other Sources
  102. 9.5 Reading Binary Files
  103. 9.6 Writing Text Files
  104. 9.7 Visiting Directories
  105. 9.8 Serialization
  106. 9.9 Process Control
  107. 9.10 Regular Expressions
  108. 9.11 Regular Expression Groups
  109. Exercises
  110. Chapter 10. Traitsqueue
  111. 10.1 Why No Multiple Inheritance?
  112. 10.2 Traits as Interfaces
  113. 10.3 Traits with Concrete Implementations
  114. 10.4 Objects with Traits
  115. 10.5 Layered Traits
  116. 10.6 Overriding Abstract Methods in Traits
  117. 10.7 Traits for Rich Interfaces
  118. 10.8 Concrete Fields in Traits
  119. 10.9 Abstract Fields in Traits
  120. 10.10 Trait Construction Order
  121. 10.11 Initializing Trait Fields
  122. 10.12 Traits Extending Classes
  123. 10.13 Self Types
  124. 10.14 What Happens under the Hood
  125. Exercises
  126. Chapter 11. Operatorsqueue
  127. 11.1 Identifiers
  128. 11.2 Infix Operators
  129. 11.3 Unary Operators
  130. 11.4 Assignment Operators
  131. 11.5 Precedence
  132. 11.6 Associativity
  133. 11.7 The apply and update Methods
  134. 11.8 Extractors
  135. 11.9 Extractors with One or No Arguments
  136. 11.10 The unapplySeq Method
  137. 11.11 Dynamic Invocation
  138. Exercises
  139. Chapter 12. Higher-Order Functionsqueue
  140. 12.1 Functions as Values
  141. 12.2 Anonymous Functions
  142. 12.3 Functions with Function Parameters
  143. 12.4 Parameter Inference
  144. 12.5 Useful Higher-Order Functions
  145. 12.6 Closures
  146. 12.7 SAM Conversions
  147. 12.8 Currying
  148. 12.9 Control Abstractions
  149. 12.10 The return Expression
  150. Exercises
  151. Chapter 13. Collectionsqueue
  152. 13.1 The Main Collections Traits
  153. 13.2 Mutable and Immutable Collections
  154. 13.3 Sequences
  155. 13.4 Lists
  156. 13.5 Sets
  157. 13.6 Operators for Adding or Removing Elements
  158. 13.7 Common Methods
  159. 13.8 Mapping a Function
  160. 13.9 Reducing, Folding, and Scanning
  161. 13.10 Zipping
  162. 13.11 Iterators
  163. 13.12 Streams
  164. 13.13 Lazy Views
  165. 13.14 Interoperability with Java Collections
  166. 13.15 Parallel Collections
  167. Exercises
  168. Chapter 14. Pattern Matching And Case Classesqueue
  169. 14.1 A Better Switch
  170. 14.2 Guards
  171. 14.3 Variables in Patterns
  172. 14.4 Type Patterns
  173. 14.5 Matching Arrays, Lists, and Tuples
  174. 14.6 Extractors
  175. 14.7 Patterns in Variable Declarations
  176. 14.8 Patterns in for Expressions
  177. 14.9 Case Classes
  178. 14.10 The copy Method and Named Parameters
  179. 14.11 Infix Notation in case Clauses
  180. 14.12 Matching Nested Structures
  181. 14.13 Are Case Classes Evil?
  182. 14.14 Sealed Classes
  183. 14.15 Simulating Enumerations
  184. 14.16 The Option Type
  185. 14.17 Partial Functions
  186. Exercises
  187. Chapter 15. Annotationsqueue
  188. 15.1 What Are Annotations?
  189. 15.2 What Can Be Annotated?
  190. 15.3 Annotation Arguments
  191. 15.4 Annotation Implementations
  192. 15.5 Annotations for Java Features
  193. 15.5.1 Java Modifiers
  194. 15.5.2 Marker Interfaces
  195. 15.5.3 Checked Exceptions
  196. 15.5.4 Variable Arguments
  197. 15.5.5 JavaBeans
  198. 15.6 Annotations for Optimizations
  199. 15.6.1 Tail Recursion
  200. 15.6.2 Jump Table Generation and Inlining
  201. 15.6.3 Eliding Methods
  202. 15.6.4 Specialization for Primitive Types
  203. 15.7 Annotations for Errors and Warnings
  204. Exercises
  205. Chapter 16. XML Processingqueue
  206. 16.1 XML Literals
  207. 16.2 XML Nodes
  208. 16.3 Element Attributes
  209. 16.4 Embedded Expressions
  210. 16.5 Expressions in Attributes
  211. 16.6 Uncommon Node Types
  212. 16.7 XPath-like Expressions
  213. 16.8 Pattern Matching
  214. 16.9 Modifying Elements and Attributes
  215. 16.10 Transforming XML
  216. 16.11 Loading and Saving
  217. 16.12 Namespaces
  218. Exercises
  219. Chapter 17. Futuresqueue
  220. 17.1 Running Tasks in the Future
  221. 17.2 Waiting for Results
  222. 17.3 The Try Class
  223. 17.4 Callbacks
  224. 17.5 Composing Future Tasks
  225. 17.6 Other Future Transformations
  226. 17.7 Methods in the Future Object
  227. 17.8 Promises
  228. 17.9 Execution Contexts
  229. Exercises
  230. Chapter 18. Type Parametersqueue
  231. 18.1 Generic Classes
  232. 18.2 Generic Functions
  233. 18.3 Bounds for Type Variables
  234. 18.4 View Bounds
  235. 18.5 Context Bounds
  236. 18.6 The ClassTag Context Bound
  237. 18.7 Multiple Bounds
  238. 18.8 Type Constraints
  239. 18.9 Variance
  240. 18.10 Co- and Contravariant Positions
  241. 18.11 Objects Can’t Be Generic
  242. 18.12 Wildcards
  243. Exercises
  244. Chapter 19. Advanced Typesqueue
  245. 19.1 Singleton Types
  246. 19.2 Type Projections
  247. 19.3 Paths
  248. 19.4 Type Aliases
  249. 19.5 Structural Types
  250. 19.6 Compound Types
  251. 19.7 Infix Types
  252. 19.8 Existential Types
  253. 19.9 The Scala Type System
  254. 19.10 Self Types
  255. 19.11 Dependency Injection
  256. 19.12 Abstract Types
  257. 19.13 Family Polymorphism
  258. 19.14 Higher-Kinded Types
  259. Exercises
  260. Chapter 20. Parsingqueue
  261. 20.1 Grammars
  262. 20.2 Combining Parser Operations
  263. 20.3 Transforming Parser Results
  264. 20.4 Discarding Tokens
  265. 20.5 Generating Parse Trees
  266. 20.6 Avoiding Left Recursion
  267. 20.7 More Combinators
  268. 20.8 Avoiding Backtracking
  269. 20.9 Packrat Parsers
  270. 20.10 What Exactly Are Parsers?
  271. 20.11 Regex Parsers
  272. 20.12 Token-Based Parsers
  273. 20.13 Error Handling
  274. Exercises
  275. Chapter 21. Implicitsqueue
  276. 21.1 Implicit Conversions
  277. 21.2 Using Implicits for Enriching Existing Classes
  278. 21.3 Importing Implicits
  279. 21.4 Rules for Implicit Conversions
  280. 21.5 Implicit Parameters
  281. 21.6 Implicit Conversions with Implicit Parameters
  282. 21.7 Context Bounds
  283. 21.8 Type Classes
  284. 21.9 Evidence
  285. 21.10 The @implicitNotFound Annotation
  286. 21.11 CanBuildFrom Demystified
  287. Exercises
  288. Index