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

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
主站蜘蛛池模板: 揭东县| 新巴尔虎左旗| 赤水市| 临夏县| 翁源县| 青河县| 安徽省| 桐城市| 封开县| 丰台区| 新巴尔虎左旗| 湘潭市| 马龙县| 香港| 安福县| 定兴县| 义乌市| 汕头市| 咸丰县| 天门市| 师宗县| 聂拉木县| 揭西县| 微山县| 友谊县| 大兴区| 桑日县| 张家界市| 新干县| 扎鲁特旗| 庆元县| 深水埗区| 五华县| 汽车| 贞丰县| 定结县| 厦门市| 钟祥市| 中西区| 上蔡县| 平乐县|