- 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
推薦閱讀
- 自己動手寫搜索引擎
- SQL Server 2012數據庫技術及應用(微課版·第5版)
- Learning SAP Analytics Cloud
- 跟老齊學Python:輕松入門
- 技術領導力:程序員如何才能帶團隊
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(入門與提高篇)
- Android Studio Cookbook
- Flask Web開發:基于Python的Web應用開發實戰(第2版)
- 貫通Tomcat開發
- 算法圖解
- 3D Printing Designs:The Sun Puzzle
- Learning Shiny
- Java編程指南:語法基礎、面向對象、函數式編程與項目實戰
- Web開發新體驗
- C#網絡程序開發(第二版)