- Learn Scala Programming
- Slava Schmidt
- 151字
- 2021-06-10 19:35:43
Understanding Types in Scala
The strong type system is one of the most important parts of the Scala language. Like a double-edged sword, it helps the compiler to verify and optimize the code on one side, while at the same time guiding developers toward possible correct implementations and preventing them from making programming mistakes on another side. As with any sharp tool, it requires some skill so that it can be used for carving beautiful source code without cutting the user in the process.
In this chapter, we will improve this skill by recapping and summarizing basic type-related knowledge, taking a look at a new type that was introduced in Scala 2.13, and finally looking at some advanced usages of types.
The following topics will be covered in this chapter:
- Different ways to create a type
- Different ways to parameterize a type
- Kinds of types
- Using types to express domain constraints
推薦閱讀
- The Complete Rust Programming Reference Guide
- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- TypeScript入門與實(shí)戰(zhàn)
- 三維圖形化C++趣味編程
- Functional Programming in JavaScript
- 概率成形編碼調(diào)制技術(shù)理論及應(yīng)用
- SQL基礎(chǔ)教程(視頻教學(xué)版)
- jQuery開發(fā)基礎(chǔ)教程
- 零基礎(chǔ)入門學(xué)習(xí)Python
- Clojure Reactive Programming
- 前端HTML+CSS修煉之道(視頻同步+直播)
- Learning Laravel's Eloquent
- Mastering ArcGIS Enterprise Administration
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)教程(Windows 7+Office 2010)
- Qt5 C++ GUI Programming Cookbook