title: Scala with Cats 学习笔记1-Type Class 的思考
date: 2019–06–16
permalink: scala-with-cats-type-class-thinking
grammar_cjkRuby: true

  • scala
  • cats
  • Knowledge

Abstract: Scala 中有一个新的概念就是 implicit ,在阅读 Scala with Cats 这本书的第一章着重在介绍这个概念。本文记录在学习过程中个人的一些理解,从而能够帮助更好的在实际项目中应用。


首先我们介绍一下这个 implicitType Class 的一个最典型应用场景:对象序列化

在编程中 ObjectJSON 之 …

Abstract: This article introduce a plugin to help check the relationship of the dependencies in Sbt.

We usually use the [Maven Helper](https://plugins.jetbrains.com/plugin/7179-maven-helper) in IntelliJ to resolve the conflict of the dependencies of Maven. So how about the sbt?

There is an Sbt plugin can be used for that target: [sbt-dependency-graph](https://github.com/jrudolph/sbt-dependency-graph).

The basic usage is as follow:

1. `sbt backend/dependencyTree`: show ASCII graph in a terminal. The output will look like as follows: if the dependency is not active, it will be noted as `(evicted by: 1.3.4)`. …

SBT dependency single and double per cent sign

Abstract: This article introduce how to use the **single** (`%`) and **double** (`%%`) per cent sign in `sbt` dependency.

## Introduction

As we know, in the sbt dependency description, there are two type symbols:

1. single per cent sign`%`
2. double per cent sign`%%`

The latest Play framework official document [Managing library dependencies](https://www.playframework.com/documentation/2.7.x/sbtDependencies) give a detail description of how to add the dependency to the sbt build description file.

### Getting the right Scala version with `%%`

If you use `groupID %% artifactID % revision` rather than `groupID % artifactID % revision` (the difference is the double `%%` after the `groupID`), sbt will add your **project’s Scala version** to the artifact name. This is just a shortcut. …

Mind and Hand

Mind and Hand


Xin Meng

Full Stack Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store