Skip to content

更新20章泛型翻译 #332

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

Merged
merged 4 commits into from
Dec 5, 2019
Merged

更新20章泛型翻译 #332

merged 4 commits into from
Dec 5, 2019

Conversation

siyuanzhou
Copy link
Contributor

术语*混型*随时间的推移好像拥有了无数的含义,但是其最基本的概念是混合多个类的能力,以产生一个可以表示混型中所有类型的类。这往往是你最后的手段,它将使组装多个类变得简单易行。
混型的价值之一是它们可以将特性和行为一致地应用于多个类之上。如果想在混型类中修改某些东西,作为一种意外的好处,这些修改将会应用于混型所应用的所有类型之上。正由于此,混型有一点*面向方面编程* (AOP) 的味道,而方面经常被建议用来解决混型问题。

### C++中的混型
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个混型是什么。。。貌似中文翻译没有这种术语

## 混型

术语*混型*随时间的推移好像拥有了无数的含义,但是其最基本的概念是混合多个类的能力,以产生一个可以表示混型中所有类型的类。这往往是你最后的手段,它将使组装多个类变得简单易行。
混型的价值之一是它们可以将特性和行为一致地应用于多个类之上。如果想在混型类中修改某些东西,作为一种意外的好处,这些修改将会应用于混型所应用的所有类型之上。正由于此,混型有一点*面向方面编程* (AOP) 的味道,而方面经常被建议用来解决混型问题。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AOP 通常翻译为面向切面。

面向方面不太好



<!-- Summary: Is Casting Really So Bad? -->
## 泛型的优劣
## 总结:转型真的如此之糟吗?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

casting 还是用多点字吧「类型转换」
「转型」这种翻译如果不是看原文,,谁能第一个反应出来是 cast


正如反射解决方案看起来那样优雅,我们必须观察到反射(尽管在Java的最新版本中得到了显着改进)通常比非反射实现要慢,因为在运行时发生了很多事情。 但它不应阻止您尝试这种解决方案,这依然是值得考虑的一点。

几乎可以肯定,您会首先使用 Java 8 功能方法,并且只有在解决了特殊需求时才诉诸反射。 这里对 **ApplyTest.java** 进行了重写,以利用 Java 8 的流和函数工具:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用您,用「你」

@siyuanzhou
Copy link
Contributor Author

siyuanzhou commented Dec 3, 2019 via email

@lingcoder lingcoder merged commit 3392edf into lingcoder:master Dec 5, 2019
siyuanzhou pushed a commit to siyuanzhou/OnJava8 that referenced this pull request Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants