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

Consider moving generics/gen_trait (to traits?) #913

Closed
dwbrite opened this issue Sep 19, 2017 · 4 comments
Closed

Consider moving generics/gen_trait (to traits?) #913

dwbrite opened this issue Sep 19, 2017 · 4 comments

Comments

@dwbrite
Copy link
Contributor

dwbrite commented Sep 19, 2017

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:

  1. Leave everything as is.
  2. Move generics/gen_traits to trait/gen_traits
  3. Move the whole traits chapter to be before the generics chapter.

Thoughts?

@steveklabnik
Copy link
Member

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!

@dwbrite
Copy link
Contributor Author

dwbrite commented Sep 19, 2017

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.

@steveklabnik
Copy link
Member

Yeah, this is tough. A related thing I've been wondering about: I'm not sure the split about std vs std_misc makes sense....

Maybe the entire order needs to be re-thought?

@epage epage mentioned this issue Jan 23, 2018
3 tasks
@marioidival
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants