Skip to content
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

Use example that where associated type is different from the type it's implemented on #94

Open
lislis opened this issue Dec 12, 2021 · 0 comments

Comments

@lislis
Copy link
Contributor

lislis commented Dec 12, 2021

https://ferrous-systems.github.io/teaching-material/traits.html#/22

Having a different associated type than Point in this example would help clarify how the associated type is different and why it's needed. My group suggested extending the example to use a Point2D and Point3D and how you could add one to the other.
Or maybe showing how an Iterator is implemented and how Item is used in there.

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

No branches or pull requests

1 participant