Scala学习——资源整理

模式匹配

话说模式匹配(1) 什么是模式?http://hongjiang.info/scala-pattern-matching-1/
话说模式匹配(2) scala里是怎么实现的? http://hongjiang.info/scala-pattern-matching-2/
话说模式匹配(3) 模式匹配的核心功能是解构!http://hongjiang.info/scala-pattern-matching-3/
话说模式匹配(4) 赋值语句与模式匹配 http://hongjiang.info/scala-pattern-matching-4/
话说模式匹配(5) for表达式中的模式匹配 http://hongjiang.info/scala-pattern-matching-5/
话说模式匹配(6) case类的细节 http://hongjiang.info/scala-pattern-matching-6/
话说模式匹配(7) 一个构造器模式的例子(by case class) http://hongjiang.info/scala-pattern-matching-7/
话说模式匹配(8) 一个抽取器的例子 http://hongjiang.info/scala-pattern-matching-8/

类型相关
scala类型系统:1) 类型与类 http://hongjiang.info/scala-type-and-class/
scala类型系统:2) classOf与getClass方法的差异 http://hongjiang.info/scala-type-system-classof-and-getclass/
scala类型系统:3) 单例类型 http://hongjiang.info/scala-type-system-singleton-type/
scala类型系统:4) 内部类,路径依赖类型&类型投影 http://hongjiang.info/scala-type-system-inner-type-and-type-projection/
scala类型系统:5) 结构类型 http://hongjiang.info/scala-type-system-structural-type/
scala类型系统:6) 复合类型与with关键字 http://hongjiang.info/scala-type-system-compund-type/
scala类型系统:7) 中缀类型 http://hongjiang.info/scala-type-system-infix-type/
scala类型系统:8) type关键字 http://hongjiang.info/scala-type-system-type-keyword/
scala类型系统:9) this别名&自身类型 http://hongjiang.info/scala-type-system-self-type/
scala类型系统:10) 交集类型与联合类型 http://hongjiang.info/scala-intersection-type-and-union-type/
scala类型系统:11) upper bounds & lower bounds http://hongjiang.info/scala-upper-bounds-and-lower-bounds/
scala类型系统:12) view bounds http://hongjiang.info/scala-type-system-view-bounds/
scala类型系统:13) context bounds http://hongjiang.info/scala-type-system-context-bounds/
scala类型系统:14) multiple bounds http://hongjiang.info/scala-type-system-multiple-bounds/
scala类型系统:15) 协变与逆变 http://hongjiang.info/scala-covariance-and-contravariance/
scala类型系统:16) 函数类型 http://hongjiang.info/scala-function-type/
scala类型系统:17) 结构类型的细节问题 http://hongjiang.info/scala-structural-type-detail/
scala类型系统:18) 不稳定(volatile)类型 http://hongjiang.info/scala-type-system-volatile-type/
scala类型系统:19) Manifest与TypeTag http://hongjiang.info/scala-type-system-manifest-vs-typetag/
scala类型系统:20) 数组类型 http://hongjiang.info/scala-type-system-array-type/
scala类型系统:21) type specialization与类爆炸 http://hongjiang.info/scala-type-specialization/
scala类型系统:22) 类型约束与特定方法 http://hongjiang.info/scala-type-contraints-and-specialized-methods/
scala类型系统:23) 用类型证明实现联合类型 http://hongjiang.info/scala-type-evidence-and-union-type/
scala类型系统:24) 理解 higher-kinded-type http://hongjiang.info/scala-higher-kinded-type/
scala类型系统:25) type lambda http://hongjiang.info/scala-type-lambda/
scala类型系统:26) type classes模式 http://hongjiang.info/scala-type-classes-pattern/
scala类型系统:27) 回顾常见的type classes http://hongjiang.info/scala-type-classes-review/
scala类型系统:28) 依赖类型 http://hongjiang.info/scala-type-system-dependent-types/
scala类型系统:case class与代数数据类型 http://hongjiang.info/scala-case-class-and-algebraic-data-type/
scala类型系统:类型推导 http://hongjiang.info/scala-type-inference/
scala类型系统:柯里-霍华德同构 http://hongjiang.info/scala-curry-howard-isomorphism/
scala类型系统:值类型与数组 http://hongjiang.info/scala-value-class-in-array/
scala类型系统:Null与Nothing,造型问题 http://hongjiang.info/scala-null-and-nothing/
scala类型系统:值类型的细节 http://hongjiang.info/scala-value-classes-detail/
scala类型系统:通用特质(universal traits) http://hongjiang.info/scala-universal-traits/
scala类型系统:值类型的装箱问题 http://hongjiang.info/scala-value-class-boxing-question/
scala类型系统:值类型的一些限制 http://hongjiang.info/scala-value-classes/

shapeless
shapeless(1): 从方法与函数的多态谈起 http://hongjiang.info/shapeless-1-polymorphic-question/
shapeless(2): 对函数(值)实现参数化多态 http://hongjiang.info/shapeless-2-polymorphic-function-impl/

类型推导相关
泛型方法转换为部分应用函数时的类型推导问题 http://hongjiang.info/generic-methods-2-partially-applied-functions/

spray
spray中的Magnet模式: typeclass的一种特定方式 http://hongjiang.info/spray-magnet-pattern/

monads & monoids
我所理解的monad(0) http://hongjiang.info/understand-monad-0/
我所理解的monad(1):半群(semigroup)与幺半群(monoid) http://hongjiang.info/semigroup-and-monoid/
我所理解的monad(2):fold与monoid http://hongjiang.info/fold-and-monoid/
我所理解的monad(3):半群(semigroup)与并行运算 http://hongjiang.info/semigroup-and-parallel/
我所理解的monad(4):函子(functor)是什么 http://hongjiang.info/understand-monad-4-what-is-functor/
我所理解的monad(5):自函子(Endofunctor)是什么 http://hongjiang.info/understand-monad-5-what-is-endofunctor/
我所理解的monad(6):从组合子(combinator)说起 http://hongjiang.info/understand-monad-6-combinator/
我所理解的monad(7):把monad看做行为的组合子 http://hongjiang.info/understand-monad-7-action-combinator/

翻译&笔记
Programming in Scala的阅读笔记 http://hongjiang.info/programming-in-scala-notes/
Effective Scala中文版 http://hongjiang.info/effective-scala-chinese/
翻译 monads-are-elephants 第一部分 http://hongjiang.info/monads-are-elephants-part1-chinese
翻译 monads-are-elephants 第二部分 http://hongjiang.info/monads-are-elephants-part2-chinese
翻译 monads-are-elephants 第三部分 http://hongjiang.info/monads-are-elephants-part3-chinese

scala pitfalls
scala雾中风景(0): 序 http://hongjiang.info/scala-pitfalls-0/
scala雾中风景(1): lambda表达式的缩写 http://hongjiang.info/scala-pitfalls-1/
scala雾中风景(2): 小括号与花括号 http://hongjiang.info/scala-pitfalls-2/
scala雾中风景(3): for表达式的背后 http://hongjiang.info/scala-pitfalls-3/
scala雾中风景(4): Unit类型 http://hongjiang.info/scala-pitfalls-4/
scala雾中风景(5): 中缀表达 http://hongjiang.info/scala-pitfalls-5/
scala雾中风景(6): 内部类与模式匹配 http://hongjiang.info/scala-pitfalls-6/
scala雾中风景(7): val x:Int = x + 1 的问题 http://hongjiang.info/scala-pitfalls-7/
scala雾中风景(8): 高阶函数与Unit的谜题 http://hongjiang.info/scala-pitfalls-8/
scala雾中风景(9): List(1,2,3) == Seq(1,2,3) ? http://hongjiang.info/scala-pitfalls-9/
scala雾中风景(10): 逆变点与协变点 http://hongjiang.info/scala-pitfalls-10/
scala雾中风景(11): isInstanceOf与类型擦拭 http://hongjiang.info/scala-pitfalls-11-type-erasure/
scala雾中风景(12): App特质的延迟初始化 http://hongjiang.info/scala-app-trait-delay-init/
scala雾中风景(13): 模式匹配中的逻辑或 http://hongjiang.info/scala-pitfalls-13/
scala雾中风景(14): trait的泛型参数为何不支持context bounds http://hongjiang.info/scala-pitfalls-14/
scala雾中风景(15): class A { type T }与class A[T] {} http://hongjiang.info/scala-pitfalls-15/
scala雾中风景(16): println(1,2,3)为什么work? http://hongjiang.info/scala-pitfalls-16/
scala雾中风景(17): toSet()的谜题 http://hongjiang.info/scala-pitfalls-17/
scala雾中风景(18): postfix operator的问题 http://hongjiang.info/scala-pitfalls-18/
scala雾中风景(19): MutableList与mutable.LinkedList的问题 http://hongjiang.info/scala-pitfalls-19/
scala雾中风景(20): MutableList迭代器的bug http://hongjiang.info/scala-pitfalls-20/
scala雾中风景(21): auto-tupling与auto-detupling http://hongjiang.info/scala-pitfalls-21-auto-tupling-and-auto-detupling/
scala雾中风景(22): var变量与赋值操作符 http://hongjiang.info/scala-pitfalls-22/
scala雾中风景(23): Nothing类型引发的NullPointerException http://hongjiang.info/scala-pitfalls-23-nothing-caused-npe/

诊断
scala的诊断方法(1) 使用-Xprint:typer看语法糖的背后 http://hongjiang.info/scala-diagnose-1/
scala的诊断方法(2) 在repl下用reify查看表达式的翻译结果 http://hongjiang.info/scala-diagnose-2/
scala的诊断方法(3) 在repl下统计方法的执行时间 http://hongjiang.info/scala-diagnose-3/
scala的诊断方法(4) -Ytyper-debug 编译项 http://hongjiang.info/scala-diagnose-4/
scala的诊断方法(5) 用scalac-aspects诊断scalac各阶段耗时 http://hongjiang.info/scalac-aspects/

函数与函数式风格
无参方法与小括号问题 http://hongjiang.info/scala-parenthesis-and-apply/
scala中的无参方法与统一访问原则 http://hongjiang.info/scala-uniform-access-principle/
scala中的eta-conversion http://hongjiang.info/scala-eta-conversion/
闭包变量绑定问题 http://hongjiang.info/closure-var-banding/
如何写一段符合scala语言习惯的快速排序 http://hongjiang.info/scala-quicksort/
Any.##方法与hashCode的区别 http://hongjiang.info/double-pound-sign-and-hashcode/
scala中的有名参数 http://hongjiang.info/scala-named-arguments/
map函数,隐式参数CanBuildFrom的细节 http://hongjiang.info/scala-canbuildfrom-detail/
scala中函数类型的多态 http://hongjiang.info/scala-function-polymorphic/
scala不是函数式语言,与Ocaml的对比 http://hongjiang.info/scala-vs-ocaml/
foldLeft与foldRight http://hongjiang.info/foldleft-and-foldright/
再谈eta-conversion与eta-expansion http://hongjiang.info/eta-conversion-and-eta-expansion/

集合相关
对tuple进行迭代 http://hongjiang.info/tuple-iterator/
String当作集合处理时的方法 http://hongjiang.info/string-as-collection/
scala中集合的交集、并集、差集 http://hongjiang.info/scala-union-diff-intersect/
Tuple1的存在意义?http://hongjiang.info/tuple1-purpose/
为什么scala中的tuple定义了22个(Tuple22)? http://hongjiang.info/why-tuples-only-to-22/
二元组箭头表达式背后的语法糖 http://hongjiang.info/scala-any2arrowassoc/
通过List.apply方法构造List的背后逻辑 http://hongjiang.info/scala-list-apply/

API pitfalls
scala类库中的api陷阱(1): LinkedList.append http://hongjiang.info/scala-api-pitfalls-1/

REPL相关
repl杂记 http://hongjiang.info/repl-misc/
repl下的几种模式 http://hongjiang.info/scala-repl-modes/
repl下的javap http://hongjiang.info/scala-repl-javap/
scala2.11的repl下增加了kind命令 http://hongjiang.info/scala-repl-kind/

scala 2.10+
scala2.10中eval一段script http://hongjiang.info/scala210-eval-script/
scala2.10.1的repl下:cp命令不能工作 http://hongjiang.info/scala210-repl-cp-do-not-work/
scala2.10中采纳了SIP-18:模块化语言特性 http://hongjiang.info/scala-sip-18/
scala2.10里的for表达式已经不允许对变量声明val http://hongjiang.info/for-comprehension-val-definition/
scala2.11编译环节的一些变动: delambdafy http://hongjiang.info/scala-compiler-delambdafy/
scala2.11编译器对lint的增强 http://hongjiang.info/scala-211-compiler-lint/

未分类
lazy变量与双重检测锁(DCL) http://hongjiang.info/scala-lazy-and-dcl/
scala里的静态代理(static-forwarders) http://hongjiang.info/scala-static-forwarders/
统计诗经中最常使用的叠词 http://hongjiang.info/scala-counting…ated-character/
scala2.9中@serializable注释已不鼓励使用 http://hongjiang.info/serializable-annotation-deprecated/
import _root_.xxx 中的_root_前缀表示xxx包名是绝对路径 http://hongjiang.info/scala-package-root-prefix/
scala中执行外部命令(scala.sys.process) http://hongjiang.info/scala-process/
classloader问题:import my.package._ 是否会load该包下所有的class? http://hongjiang.info/classloader-question-on-import-classes/
scala中有Unicode的关键字 http://hongjiang.info/scala-unicode-reserved-words/
Any类的源码在哪儿?http://hongjiang.info/cannot-find-soucecode-of-class-any/
scala编译器的一个bug http://hongjiang.info/scala-compiler-bug/
scala bug系列:2.10编译器把单例当作类型的bug http://hongjiang.info/scala-bug-210-object-as-type/

分享与交流
分享ppt: scala中的函数与闭包 http://hongjiang.info/scala-function-and-closure/
与19楼的交流 http://hongjiang.info/scala-19lou/
上海scala爱好者聚会(2013) http://hongjiang.info/scala-shanghai-512/
阿里技术嘉年华2013 http://hongjiang.info/adc2013/
2013华东scala爱好者聚会(杭州) http://hongjiang.info/scala-hangzhou-2013-1019/
华东地区scala爱好者聚会(2014上海) http://hongjiang.info/scala-shanghai-2014/
华东地区scala爱好者聚会(2015上海) http://hongjiang.info/scala-shanghai-2015/

依赖注入
Cake Pattern与依赖注入 http://hongjiang.info/cake-pattern-and-di/
scala中的self type(自身类型)与依赖注入 http://hongjiang.info/scala-self-type-and-di/

发布了29 篇原创文章 · 获赞 2 · 访问量 8万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章