-
Notifications
You must be signed in to change notification settings - Fork 1k
Simplified Chinese Translation of the Cheatsheet #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
translated the cheatsheet into Chinese, using the English and Japanese version as references.
can you suggest a reviewer? we usually ask that at least one other person review new translations. |
See #280 and 21 authors listed on #450 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some comments based on my understanding. 😬
zh-cn/cheatsheets/index.md
Outdated
| <span id="variables" class="h2">变量</span> | | | ||
| `var x = 5` | 变量 | | ||
| <span class="label success">Good</span> `val x = 5`<br> <span class="label important">Bad</span> `x=6` | 常量 | | ||
| `var x: Double = 5` | 指定数据类型 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about 显示类型
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
显式类型
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
谢谢大神们的建议,尤其是@xring,审核的非常仔细。
zh-cn/cheatsheets/index.md
Outdated
| <span class="label success">Good</span> `def f(x: Int) = { x*x }`<br> <span class="label important">Bad</span> `def f(x: Int) { x*x }` | 定义函数 <br> 隐藏错误: 没有“=”程序会返回Unit类型,这将会引起重大灾难。 | | ||
| <span class="label success">Good</span> `def f(x: Any) = println(x)`<br> <span class="label important">Bad</span> `def f(x) = println(x)` | 定义函数 <br> 语法错误: 每个参数都需要指定类型。 | | ||
| `type R = Double` | 类型别名 | | ||
| `def f(x: R)` vs.<br> `def f(x: => R)` | 按值调用 <br> 按名称调用 (惰性参数) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about call by value
-> 传值调用
and call by name
-> 传名调用
?
zh-cn/cheatsheets/index.md
Outdated
| `(1 to 5).map(_*2)` vs.<br> `(1 to 5).reduceLeft( _+_ )` | 匿名函数: 下划线是arg参数的占位符。 | | ||
| `(1 to 5).map( x => x*x )` | 匿名函数: 必须命名以后才可以使用一个arg参数两次。 | | ||
| <span class="label success">Good</span> `(1 to 5).map(2*)`<br> <span class="label important">Bad</span> `(1 to 5).map(*2)` | 匿名函数: 边界前缀方法,理智的人都用`2*_`。 | | ||
| `(1 to 5).map { x => val y=x*2; println(y); y }` | 匿名函数: 上个方法的程序块风格。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
block style returns last expression
-> 程序块风格,返回值是最后一个表达式。
zh-cn/cheatsheets/index.md
Outdated
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | 匿名函数: 要传入多个程序块的话,需要外部括号。 | | ||
| `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd` | 柯里化,语法糖,然并卵。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to replace 然并卵
with another word. 😂
zh-cn/cheatsheets/index.md
Outdated
| `def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd` | 柯里化,语法糖,然并卵。 | | ||
| `val normer = zscore(7, 0.4) _` | 需要接上下划线才能得到偏微商(只适用于语法糖版本)。 | | ||
| `def mapmake[T](g:T=>T)(seq: List[T]) = seq.map(g)` | 泛型 | | ||
| `5.+(3); 5 + 3` <br> `(1 to 5) map (_*2)` | 前缀语法糖 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
infix
-> 中缀
zh-cn/cheatsheets/index.md
Outdated
| `class C extends D { ... }` | 定义一个继承子类。 | | ||
| `class D(var x: R)`<br>`class C(x: R) extends D(x)` | 继承与构造器参数(愿望清单: 默认自动传参) | ||
| `object O extends D { ... }` | 定义一个单例模式(模块化的) | | ||
| `trait T { ... }`<br>`class C extends T { ... }`<br>`class C extends D with T { ... }` | 特性<br>带有实现的接口,没有构造参数。 [mixin-able]({{ site.baseurl }}/tutorials/tour/mixin-class-composition.html). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trait
--> 特质
zh-cn/cheatsheets/index.md
Outdated
| `class D(var x: R)`<br>`class C(x: R) extends D(x)` | 继承与构造器参数(愿望清单: 默认自动传参) | ||
| `object O extends D { ... }` | 定义一个单例模式(模块化的) | | ||
| `trait T { ... }`<br>`class C extends T { ... }`<br>`class C extends D with T { ... }` | 特性<br>带有实现的接口,没有构造参数。 [mixin-able]({{ site.baseurl }}/tutorials/tour/mixin-class-composition.html). | ||
| `trait T1; trait T2`<br>`class C extends T1 with T2`<br>`class C extends D with T1 with T2` | 多重特性 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple traits
--> (混入)多个特质
zh-cn/cheatsheets/index.md
Outdated
| `object O extends D { ... }` | 定义一个单例模式(模块化的) | | ||
| `trait T { ... }`<br>`class C extends T { ... }`<br>`class C extends D with T { ... }` | 特性<br>带有实现的接口,没有构造参数。 [mixin-able]({{ site.baseurl }}/tutorials/tour/mixin-class-composition.html). | ||
| `trait T1; trait T2`<br>`class C extends T1 with T2`<br>`class C extends D with T1 with T2` | 多重特性 | | ||
| `class C extends D { override def f = ...}` | 必须声明函数的重载。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override
--> 重写/覆盖
zh-cn/cheatsheets/index.md
Outdated
| `trait T1; trait T2`<br>`class C extends T1 with T2`<br>`class C extends D with T1 with T2` | 多重特性 | | ||
| `class C extends D { override def f = ...}` | 必须声明函数的重载。 | | ||
| `new java.io.File("f")` | 创建类。 | | ||
| <span class="label important">Bad</span> `new List[Int]`<br> <span class="label success">Good</span> `List(1,2,3)` | 类型错误: 抽象类型<br>相反,习惯上:调用的“工厂“会推测类型 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callable factory shadowing the type
--> 调用工厂(方法)会自动推测类型
zh-cn/cheatsheets/index.md
Outdated
| `class C extends D { override def f = ...}` | 必须声明函数的重载。 | | ||
| `new java.io.File("f")` | 创建类。 | | ||
| <span class="label important">Bad</span> `new List[Int]`<br> <span class="label success">Good</span> `List(1,2,3)` | 类型错误: 抽象类型<br>相反,习惯上:调用的“工厂“会推测类型 | | ||
| `classOf[String]` | 类字面常量 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类字面常量
--> 类字面量
zh-cn/cheatsheets/index.md
Outdated
| `trait T { ... }`<br>`class C extends T { ... }`<br>`class C extends D with T { ... }` | 特性<br>带有实现的接口,没有构造参数。 [mixin-able]({{ site.baseurl }}/tutorials/tour/mixin-class-composition.html). | ||
| `trait T1; trait T2`<br>`class C extends T1 with T2`<br>`class C extends D with T1 with T2` | 多重特性 | | ||
| `class C extends D { override def f = ...}` | 必须声明函数的重载。 | | ||
| `new java.io.File("f")` | 创建类。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类
--> 对象
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哈哈,感谢。
@SethTisue @eed3si9n Hi, I have committed a new version according the reviewers' suggestions. Special Thanks to @xring , as well as @dcaoyuan , @kunkun-tang. |
zh-cn/cheatsheets/index.md
Outdated
| | | | ||
| ------ | ------ | | ||
| <span id="variables" class="h2">变量</span> | | | ||
| `var x = 5` | 变量 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可变量
zh-cn/cheatsheets/index.md
Outdated
| <span class="label success">Good</span> `val x = 5`<br> <span class="label important">Bad</span> `x=6` | 常量 | | ||
| `var x: Double = 5` | 显式类型 | | ||
| <span id="functions" class="h2">函数</span> | | | ||
| <span class="label success">Good</span> `def f(x: Int) = { x*x }`<br> <span class="label important">Bad</span> `def f(x: Int) { x*x }` | 定义函数 <br> 隐藏错误: 没有“=”程序会返回Unit类型,这将会引起重大灾难。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
隐藏出错:不加 = 号将是一段返回 Unit 类型的过程, 会导致意想不到的错误。
zh-cn/cheatsheets/index.md
Outdated
| `(x:R) => x*x` | 匿名函数 | | ||
| `(1 to 5).map(_*2)` vs.<br> `(1 to 5).reduceLeft( _+_ )` | 匿名函数: 下划线是arg参数的占位符。 | | ||
| `(1 to 5).map( x => x*x )` | 匿名函数: 必须命名以后才可以使用一个arg参数两次。 | | ||
| <span class="label success">Good</span> `(1 to 5).map(2*)`<br> <span class="label important">Bad</span> `(1 to 5).map(*2)` | 匿名函数: 边界前缀方法,理智的人都用`2*_`。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
匿名函数: 绑定前缀方法,明智的用法是2*_
。
zh-cn/cheatsheets/index.md
Outdated
| `(1 to 5).map(_*2)` vs.<br> `(1 to 5).reduceLeft( _+_ )` | 匿名函数: 下划线是arg参数的占位符。 | | ||
| `(1 to 5).map( x => x*x )` | 匿名函数: 必须命名以后才可以使用一个arg参数两次。 | | ||
| <span class="label success">Good</span> `(1 to 5).map(2*)`<br> <span class="label important">Bad</span> `(1 to 5).map(*2)` | 匿名函数: 边界前缀方法,理智的人都用`2*_`。 | | ||
| `(1 to 5).map { x => val y=x*2; println(y); y }` | 匿名函数: 程序块风格,返回的是最后一个表达式。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
匿名函数:程序块风格,最后一个表达式作为返回值。
zh-cn/cheatsheets/index.md
Outdated
| `(1 to 5).map( x => x*x )` | 匿名函数: 必须命名以后才可以使用一个arg参数两次。 | | ||
| <span class="label success">Good</span> `(1 to 5).map(2*)`<br> <span class="label important">Bad</span> `(1 to 5).map(*2)` | 匿名函数: 边界前缀方法,理智的人都用`2*_`。 | | ||
| `(1 to 5).map { x => val y=x*2; println(y); y }` | 匿名函数: 程序块风格,返回的是最后一个表达式。 | | ||
| `(1 to 5) filter {_%2 == 0} map {_*2}` | 匿名函数: 管道风格(或者叫括号风格)。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
匿名函数:管道风格(也可以用圆括号)。
zh-cn/cheatsheets/index.md
Outdated
| <span class="label success">Good</span> `(1 to 5).map(2*)`<br> <span class="label important">Bad</span> `(1 to 5).map(*2)` | 匿名函数: 边界前缀方法,理智的人都用`2*_`。 | | ||
| `(1 to 5).map { x => val y=x*2; println(y); y }` | 匿名函数: 程序块风格,返回的是最后一个表达式。 | | ||
| `(1 to 5) filter {_%2 == 0} map {_*2}` | 匿名函数: 管道风格(或者叫括号风格)。 | | ||
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | 匿名函数: 要传入多个程序块的话,需要外部括号。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
匿名函数:要传入多个程序块的话,需要外围括号。
zh-cn/cheatsheets/index.md
Outdated
| `(1 to 5).map { x => val y=x*2; println(y); y }` | 匿名函数: 程序块风格,返回的是最后一个表达式。 | | ||
| `(1 to 5) filter {_%2 == 0} map {_*2}` | 匿名函数: 管道风格(或者叫括号风格)。 | | ||
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | 匿名函数: 要传入多个程序块的话,需要外部括号。 | | ||
| `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
柯里化,明显的语法。
zh-cn/cheatsheets/index.md
Outdated
| `(1 to 5) filter {_%2 == 0} map {_*2}` | 匿名函数: 管道风格(或者叫括号风格)。 | | ||
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | 匿名函数: 要传入多个程序块的话,需要外部括号。 | | ||
| `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
柯里化,明显的语法。
zh-cn/cheatsheets/index.md
Outdated
| `def compose(g:R=>R, h:R=>R) = (x:R) => g(h(x))` <br> `val f = compose({_*2}, {_-1})` | 匿名函数: 要传入多个程序块的话,需要外部括号。 | | ||
| `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd` | 柯里化,语法糖。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
柯里化,语法糖。然后:
Reviewers: please write "LGTM" when you think this PR is good to go. 多谢 :) |
zh-cn/cheatsheets/index.md
Outdated
| `val zscore = (mean:R, sd:R) => (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R) = (x:R) => (x-mean)/sd` | 柯里化, 很显然的语法。 | | ||
| `def zscore(mean:R, sd:R)(x:R) = (x-mean)/sd` | 柯里化,语法糖。 | | ||
| `val normer = zscore(7, 0.4) _` | 需要在后面加下划线来部分应用(只适用于语法糖版本)。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要在尾部加下划线来变成偏函数(只对语法糖版本适用)。
zh-cn/cheatsheets/index.md
Outdated
| `import scala.collection.Vector` <br> `import scala.collection.{Vector, Sequence}` | 选择性导入 | | ||
| `import scala.collection.{Vector => Vec28}` | 重命名导入 | | ||
| `import java.util.{Date => _, _}` | 导入java.util包里除Date之外的所有文件. | | ||
| `package pkg` _at start of file_ <br> `package pkg { ... }` | 声明一个包 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
声明这是一个包
zh-cn/cheatsheets/index.md
Outdated
| <span class="label important">Bad</span>`var x,y,z = (1,2,3)` | 隐藏错误:每一个变量都被赋值了整个元组。 | | ||
| `var xs = List(1,2,3)` | 列表 (不可变). | | ||
| `xs(2)` | 用括号索引 ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/27)) | | ||
| `1 :: List(2,3)` | cons | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cons (构成)
zh-cn/cheatsheets/index.md
Outdated
| `xs(2)` | 用括号索引 ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/27)) | | ||
| `1 :: List(2,3)` | cons | | ||
| `1 to 5` _等价于_ `1 until 6` <br> `1 to 10 by 2` | Range类型(语法糖) | | ||
| `()` _(空括号)_ | Unit类型的专有成员 (相当于 C/Java 里的void). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit类型的唯一成员 (相当于 C/Java 里的void)
zh-cn/cheatsheets/index.md
Outdated
| `while (x < 5) { println(x); x += 1}` | while循环 | | ||
| `do { println(x); x += 1} while (x < 5)` | do while循环 | | ||
| `import scala.util.control.Breaks._`<br>`breakable {`<br>` for (x <- xs) {`<br>` if (Math.random < 0.1) break`<br>` }`<br>`}`| break. ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/21)) | | ||
| `for (x <- xs if x%2 == 0) yield x*10` _等价于_ <br>`xs.filter(_%2 == 0).map(_*10)` | for循环: filter/map | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for comprehension (for 导出): filter/map
zh-cn/cheatsheets/index.md
Outdated
| `do { println(x); x += 1} while (x < 5)` | do while循环 | | ||
| `import scala.util.control.Breaks._`<br>`breakable {`<br>` for (x <- xs) {`<br>` if (Math.random < 0.1) break`<br>` }`<br>`}`| break. ([slides](http://www.slideshare.net/Odersky/fosdem-2009-1013261/21)) | | ||
| `for (x <- xs if x%2 == 0) yield x*10` _等价于_ <br>`xs.filter(_%2 == 0).map(_*10)` | for循环: filter/map | | ||
| `for ((x,y) <- xs zip ys) yield x*y` _等价于_ <br>`(xs zip ys) map { case (x,y) => x*y }` | for循环: 解构绑定 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for comprehension (for 导出): 解构绑定
zh-cn/cheatsheets/index.md
Outdated
| `for (x <- xs; y <- ys) yield x*y` _等价于_ <br>`xs flatMap {x => ys map {y => x*y}}` | for循环: 叉乘 | | ||
| `for (x <- xs; y <- ys) {`<br> `println("%d/%d = %.1f".format(x, y, x/y.toFloat))`<br>`}` | for循环: 不可避免的格式<br>[sprintf-style](http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax) | | ||
| `for (i <- 1 to 5) {`<br> `println(i)`<br>`}` | for循环: 包括上边界的遍历 | | ||
| `for (i <- 1 until 5) {`<br> `println(i)`<br>`}` | for循环: 忽略上边界的遍历 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
以上 “for循环” 全部改成 for comprehension (for 导出)
| `new{ ... }` | 匿名类 | | ||
| `abstract class D { ... }` | 定义一个抽象类。(不可创建) | | ||
| `class C extends D { ... }` | 定义一个继承子类。 | | ||
| `class D(var x: R)`<br>`class C(x: R) extends D(x)` | 继承与构造器参数(愿望清单: 默认自动传参) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
备注:这里英文原文“(wishlist: automatically pass-up params by default)”我也没看懂,不知道原作想表达什么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得可能是作者希望未来Scala添加的功能,但表达的不是很清楚。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我的感觉是说的不需要再写一遍x:R
以及显式地传递x
了,可以隐式地传递.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该是希望可以直接这样写:
class C extends D
zh-cn/cheatsheets/index.md
Outdated
| `abstract class D { ... }` | 定义一个抽象类。(不可创建) | | ||
| `class C extends D { ... }` | 定义一个继承子类。 | | ||
| `class D(var x: R)`<br>`class C(x: R) extends D(x)` | 继承与构造器参数(愿望清单: 默认自动传参) | ||
| `object O extends D { ... }` | 定义一个单例模式(模块化的) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
定义一个单例(跟模块一样)
zh-cn/cheatsheets/index.md
Outdated
| `trait T { ... }`<br>`class C extends T { ... }`<br>`class C extends D with T { ... }` | 特质<br>带有实现的接口,没有构造参数。 [mixin-able]({{ site.baseurl }}/tutorials/tour/mixin-class-composition.html). | ||
| `trait T1; trait T2`<br>`class C extends T1 with T2`<br>`class C extends D with T1 with T2` | (混入)多个特质 | | ||
| `class C extends D { override def f = ...}` | 必须声明函数的重写。 | | ||
| `new java.io.File("f")` | 创建对象。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
必须声明覆盖该方法。
zh-cn/cheatsheets/index.md
Outdated
| <span id="data_structures" class="h2">数据结构</span> | | | ||
| `(1,2,3)` | 元组字面量 (`Tuple3`) | | ||
| `var (x,y,z) = (1,2,3)` | 解构绑定:通过模式匹配来解构元组。 | | ||
| <span class="label important">Bad</span>`var x,y,z = (1,2,3)` | 隐藏错误:每一个变量都被赋值了整个元组。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
隐藏出错:每一个变量都被赋值了整个元组。
Fantastic work! |
according to the suggestions by @dcaoyuan.
thank you @dreamibor and everyone who helped review this! |
I translated the cheatsheet into Simplified Chinese, used the English and Japanese
version as references.