简介
结合面向对象和函数式编程,Scala3 的 enum 可以表示代数数据类型,每个分支都能携带值。
使用这门语言的成员
参与的讨论
implicit vs given in a half-migrated Scala 3 file
Honestly, keeping implicit in Scala 3 was the right call and it still annoys me every week. Right call because nobody had to…
Pinned values in Ruby patterns
in [expected] will happily match [9] even with expected = 7 sitting right above it. That prints ok, expected=9. It reads like…
M-expressions and S-expressions
McCarthy's original Lisp paper gives notation two different jobs, and section e is where you can watch them separate. Functio…