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

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
主站蜘蛛池模板: 垦利县| 呼伦贝尔市| 五常市| 隆子县| 神池县| 天水市| 石林| 和田县| 交口县| 得荣县| 南城县| 宁陕县| 聂荣县| 浦东新区| 堆龙德庆县| 平陆县| 进贤县| 太康县| 湖南省| 武定县| 叶城县| 中宁县| 靖边县| 武隆县| 大埔县| 宝鸡市| 邵武市| 长阳| 陇南市| 德令哈市| 冷水江市| 怀来县| 乐陵市| 湘西| 泸溪县| 安岳县| 静安区| 平潭县| 汪清县| 青州市| 日照市|