Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

reuse: add example from tutorial #22

Merged
merged 1 commit into from
Jul 14, 2014
Merged

Conversation

nathantypanski
Copy link
Contributor

This adds the example provided in the standard Rust tutorial, with a short description, to provide an example of using traits for reuse.

Perhaps we should come up with a better example than this Printable one, but I couldn't think of anything short enough that is actually superior for understanding the concept.

Discussion could still use elaboration, but I figure having anything on this page is better than before.

@aturon
Copy link
Member

aturon commented Jul 14, 2014

Thanks for another contribution! This is a good start, although we ultimately need to give some guidance on when reuse is a good idea. (I haven't thought deeply enough about it to have one, yet.)

I'm happy to merge this if you drop the final sentence about implementing common traits, which doesn't seem highly related.

This adds the example provided in the standard Rust tutorial, with a
short description, to provide an example of using traits for reuse.
@nathantypanski
Copy link
Contributor Author

Updated as noted. I agree the last sentence was not very related.

And, yeah, I realize we need more discussion about sharing implementations and when it's smart to do so. This is just the mindless drudge work of "get something out there and find a simple example".

@aturon
Copy link
Member

aturon commented Jul 14, 2014

@nathantypanski Thanks! And I really appreciate all the help!

aturon added a commit that referenced this pull request Jul 14, 2014
reuse: add example from tutorial
@aturon aturon merged commit dc764ed into rust-lang:master Jul 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants