-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Consider moving generics/gen_trait (to traits?) #913
Comments
This is very tricky, yes! In the book, we showed the generic syntax first, using containers like Option. Then, showing a function. "hey wait a minute, you can't really do anything with this type. That's traits!" We could switch to something like that, but I'm also generally up for thoughts on how to improve! |
The only problem with option 3 is that the operator overloading (trait/ops) section necessarily relies on generics. Trait/clone also uses generics, but could be rewritten not to use generics. If we moved the traits chapter to be right before generics, then I think we could soften that issue - especially if we put trait/ops as the last section of traits and noted the use of generics. |
Yeah, this is tough. A related thing I've been wondering about: I'm not sure the split about Maybe the entire order needs to be re-thought? |
Hi, I'm closing this issue just to clean up the items that already exist. If you think this issue makes sense to stay open, please create a new issue with updated information and mention this one. thanks! |
I'm not hard set on having it this way or that, but I think it's kind of funky to cover generics in traits before traits are talked about at all. (1.)
I also understand that it would be kind of strange to cover generics under traits while all other uses of generics are subsections of the generics chapter. (2.)
We could also consider reordering the chapters so that traits are before generics. (3.)
That is to say, I can think of three options:
Thoughts?
The text was updated successfully, but these errors were encountered: