- 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
推薦閱讀
- MySQL數據庫應用與管理 第2版
- NLTK基礎教程:用NLTK和Python庫構建機器學習應用
- Machine Learning with R Cookbook(Second Edition)
- 軟件測試項目實戰之性能測試篇
- HTML5+CSS3基礎開發教程(第2版)
- Building Minecraft Server Modifications
- SharePoint Development with the SharePoint Framework
- C語言程序設計上機指導與習題解答(第2版)
- 第一行代碼 C語言(視頻講解版)
- Learning Apache Karaf
- 0 bug:C/C++商用工程之道
- Nagios Core Administration Cookbook(Second Edition)
- Python 3快速入門與實戰
- Raspberry Pi Blueprints
- SCRATCH編程課:我的游戲我做主