- Scala Functional Programming Patterns
- Atul S. Khot
- 214字
- 2021-07-30 09:44:23
Summary
Scala is expressive and rich with tools that help us to eliminate boilerplates. It allows us to concisely express the intention of programming. Functions help us reuse the common facilities, freeing us from coding them every time.
Pure functions are simpler to reason about, as there are lot less moving parts. We can think of them in terms of referential transparency. Impure functions are hard to reason with. We saw how making things immutable also helps in reducing these moving parts.
Idioms are what make us use a language effectively. This is true for programming languages. Scala is a feature-rich functional programming language. We got a bird's eye view of a few Scala features, such as recursion and functions.
Design patterns are a programmer's vocabulary. Scala gives us a fresh perspective of patterns, and we saw how the use of functions makes using design patterns so very easy in Scala.
We implemented the solution to a problem in Java and Scala. We saw how succinct and expressive the Scala code is compared to its Java counterpart.
We got our feet wet in the Scala land. Let's look at these features in detail and see how Scala makes programming cool and fun again. We will start with singleton and factories. Get, set, and go!
- C語言程序設計案例教程
- Photoshop智能手機APP UI設計之道
- 數(shù)據(jù)結構習題精解(C語言實現(xiàn)+微課視頻)
- 名師講壇:Java微服務架構實戰(zhàn)(SpringBoot+SpringCloud+Docker+RabbitMQ)
- 基于Swift語言的iOS App 商業(yè)實戰(zhàn)教程
- Python:Master the Art of Design Patterns
- ArcGIS By Example
- .NET 3.5編程
- 利用Python進行數(shù)據(jù)分析
- Modern C++ Programming Cookbook
- 玩轉.NET Micro Framework移植:基于STM32F10x處理器
- Hack與HHVM權威指南
- 軟件測試技術
- Scratch 3.0少兒積木式編程(6~10歲)
- 計算機信息技術實踐教程