- 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
推薦閱讀
- 程序員面試筆試寶典(第3版)
- 從零開始:數(shù)字圖像處理的編程基礎(chǔ)與應用
- PyTorch自動駕駛視覺感知算法實戰(zhàn)
- PostgreSQL Replication(Second Edition)
- Active Directory with PowerShell
- Learning Unreal Engine Android Game Development
- TMS320LF240x芯片原理、設計及應用
- Scala編程(第5版)
- 計算機應用技能實訓教程
- 遠方:兩位持續(xù)創(chuàng)業(yè)者的點滴思考
- 愛上C語言:C KISS
- Advanced Python Programming
- Visual C++開發(fā)寶典
- Java高手是怎樣煉成的:原理、方法與實踐
- Test-Driven iOS Development with Swift