Skip to content

Add link to Why Not Inheritance #2902

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 3 commits into from
Feb 9, 2022
Merged

Add link to Why Not Inheritance #2902

merged 3 commits into from
Feb 9, 2022

Conversation

ifsheldon
Copy link
Contributor

Add a link to a blog talking about why Rust does not have inheritance like other OO languages do.

Add a link to a blog talking about why Rust does not have inheritance like other OO languages do.
@ericseppanen
Copy link
Contributor

I don't think the text after the link is part of the TWiR style; I'd suggest removing that.

@ericseppanen
Copy link
Contributor

Can @Folyd or @MATRIXKOO review this?

@ifsheldon
Copy link
Contributor Author

It's just a little pitch. My intention is to give a brief before people consider reading it. If it's not appropriate, I'm fine with removing it.

@Folyd
Copy link
Contributor

Folyd commented Feb 8, 2022

Hi @ifsheldon, thanks for your PR. Just my two cents:

  • audiences first, not you.

For example, this sentence "所以终极的原因还是代 cheng 码 xu 可 yuan 复 tou 用 lan" brings no benefits to audiences except distractions. Personally, I don't think it is a good style for a technical article.

  • Dive deeper.

For example, I'll recommend mentioning the Deref trait which can simulate the inheritance, and also should point out that is an anti-pattern.

Do you mind changing the writing styles and supplementing more detail about Rust's inheritance? That could be better for the audience. Thanks.

However, I also recommend Rust Chinese Magazine, which is a better place to meet your Chinese audiences. Feel free to contribute to that. Here is the repo: https://github.com/RustMagazine/rust_magazine_2022

@ifsheldon
Copy link
Contributor Author

  • audiences first, not you.

For example, this sentence "所以终极的原因还是代 cheng 码 xu 可 yuan 复 tou 用 lan" brings no benefits to audiences except distractions. Personally, I don't think it is a good style for a technical article.

Why so serious? Articles can be fun and at the meantime rigorous. But yeah I agree that this line is not necessary, so I changed it.

  • Dive deeper.
    For example, I'll recommend mentioning the Deref trait which can simulate the inheritance, and also should point out that is an anti-pattern.

I don't think this article is not deep enough. Deref is just a technical detail but it does not mean it's deeper. From my personal perspective, I like Rust not because it's technically deep but it's conceptually elegant. My article resonates with Rust's design in that behind technical details, there are some deep introspections, like the introspection on "Why and Why not inheritance". It's not about how to implement inheritance technically but the design from the introspections, which makes Rust distinguishable. But sure, why not? We can have both, so, I added this anti-pattern to the appendix.

@nellshamrell
Copy link
Contributor

Thank you @ifsheldon, @Folyd, and @ericseppanen!

@nellshamrell nellshamrell merged commit 2fee653 into rust-lang:master Feb 9, 2022
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.

4 participants