官术网_书友最值得收藏!

Getting to Know Implicits and Type Classes

We are already familiar with two cornerstones of Scala—its type system and first-class functions. Implicits is the third one. Implicits enable elegant designs and probably no state-of-the-art Scala library is possible without them.

In this chapter, we will start with a systematic overview of different types of implicits and recap the implicit scope resolution rules. After taking a short look at context bounds, we'll move on to type classes, the central implementation mechanism that's utilized in modern functional programming libraries.

The following topics will be covered in this chapter:

  • Types of implicits
  • Context bounds
  • Type classes
  • Type classes and recursive resolution
  • Type class variance
  • Implicit scope resolution rules
主站蜘蛛池模板: 诸城市| 铁岭市| 乌审旗| 嘉义市| 望奎县| 上犹县| 沾化县| 六枝特区| 兴文县| 苍溪县| 赤水市| 翁源县| 同江市| 吴桥县| 鹿泉市| 芦溪县| 洞头县| 富源县| 慈溪市| 平南县| 根河市| 双城市| 遂溪县| 定襄县| 寻乌县| 平乐县| 连南| 武隆县| 阿巴嘎旗| 仙桃市| 从化市| 宁陵县| 永福县| 曲阜市| 广昌县| 屏山县| 枣阳市| 江安县| 凤山县| 大英县| 峡江县|