yangjf2019 commented on a change in pull request #267:
URL: https://github.com/apache/flink-web/pull/267#discussion_r422566344
##########
File path: contributing/code-style-and-quality-scala.zh.md
##########
@@ -8,68 +8,67 @@ title: "Apache Flink Code Style and Quality Guide — Scala"
-## Scala Language Features
+## Scala 语言特性
-### Where to use (and not use) Scala
+### 在哪儿使用(和不使用) Scala
-**We use Scala for Scala APIs or pure Scala Libraries.**
+**我们使用 Scala 的 API 或者纯 Scala 库。**
-**We do not use Scala in the core APIs and runtime components. We aim to
remove existing Scala use (code and dependencies) from those components.**
+**在 core API 和 运行时的组件中,我们不使用 Scala。我们的目标是从这些组件中删除现有的 Scala 使用(代码和依赖项)。**
-⇒ This is not because we do not like Scala, it is a consequence of “the right
tool for the right job” approach (see below).
+⇒ 这并不是因为我们不喜欢 Scala,而是考虑到“用正确的工具做正确的事”的结果(见下文)。
-For APIs, we develop the foundation in Java, and layer Scala on top.
+对于 API,我们使用 Java 开发基础内容,并在上层使用 Scala。
-* This has traditionally given the best interoperability for both Java and
Scala
-* It does mean dedicated effort to keep the Scala API up to date
+* 这在传统上为 Java 和 Scala 提供了最佳的互通性
+* 这意味着要致力于保持 Scala API 的更新
-Why don’t we use Scala in the core APIs and runtime?
+为什么我们不在 core API 和运行时中使用 Scala ?
-* The past has shown that Scala evolves too quickly with tricky changes in
functionality. Each Scala version upgrade was a rather big effort process for
the Flink community.
-* Scala does not always interact nicely with Java classes, e.g. Scala’s
visibility scopes work differently and often expose more to Java consumers than
desired
-* Scala adds an additional layer of complexity to artifact/dependency
management.
- * We may want to keep Scala dependent libraries like Akka in the runtime,
but abstract them via an interface and load them in a separate classloader, to
keep them shielded and avoid version conflicts.
-* Scala makes it very easy for knowledgeable Scala programmers to write code
that is very hard to understand for programmers that are less knowledgeable in
Scala. That is especially tricky for an open source project with a broad
community of diverse experience levels. Working around this means restricting
the Scala feature set by a lot, which defeats a good amount of the purpose of
using Scala in the first place.
+* 过去的经验显示, Scala 在功能上的变化太快了。对于 Flink 社区来说,每次 Scala 版本升级都是一个需要付出相当大努力的过程。
Review comment:
“过去的经验显示, Scala 在功能上的变化太快了。对于 Flink 社区来说,每次 Scala 版本升级都是一个比较棘手的处理过程。”
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]