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

provide additional justification for array interface design #35613

Merged

Conversation

matthew-piziak
Copy link
Contributor

Explain why Rust does not implement traits for large arrays.

Explain why most methods are implemented on slices rather than arrays.

Note: I'm dipping my toes in the water with a tiny PR. Especially looking for feedback on wording and style. Points of concern: appropriate level of top-level explanation; foreshadowing (is it appropriate to imply that we expect Rust's type system to eventually support size-generic arrays?); using Foo and Bar as type variables instead of e.g. T and S.

@peschkaj

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik
Copy link
Member

@bors: r+ rollup

Thank you!

@bors
Copy link
Contributor

bors commented Aug 12, 2016

📌 Commit a97ed61 has been approved by steveklabnik

@@ -269,13 +269,18 @@ mod prim_pointer { }
/// - `Borrow`, `BorrowMut`
/// - `Default`
///
/// This limitation to `N in 0..32` exists because Rust does not yet support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually 0..33

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

Fixed.

Explain why Rust does not implement traits for large arrays.

Explain why most methods are implemented on slices rather than arrays.
@matthew-piziak matthew-piziak force-pushed the array-docs-trait-justification branch from a97ed61 to e173ead Compare August 12, 2016 16:13
@matthew-piziak
Copy link
Contributor Author

r? @peschkaj

@matthew-piziak
Copy link
Contributor Author

r? @steveklabnik

@peschkaj
Copy link

LGTM. 👍

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 15, 2016

📌 Commit e173ead has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 17, 2016
…tification, r=steveklabnik

provide additional justification for array interface design

Explain why Rust does not implement traits for large arrays.

Explain why most methods are implemented on slices rather than arrays.

Note: I'm dipping my toes in the water with a tiny PR. Especially looking for feedback on wording and style. Points of concern: appropriate level of top-level explanation; foreshadowing (is it appropriate to imply that we expect Rust's type system to eventually support size-generic arrays?); using `Foo` and `Bar` as type variables instead of e.g. `T` and `S`.

@peschkaj
bors added a commit that referenced this pull request Aug 17, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 17, 2016
…tification, r=steveklabnik

provide additional justification for array interface design

Explain why Rust does not implement traits for large arrays.

Explain why most methods are implemented on slices rather than arrays.

Note: I'm dipping my toes in the water with a tiny PR. Especially looking for feedback on wording and style. Points of concern: appropriate level of top-level explanation; foreshadowing (is it appropriate to imply that we expect Rust's type system to eventually support size-generic arrays?); using `Foo` and `Bar` as type variables instead of e.g. `T` and `S`.

@peschkaj
bors added a commit that referenced this pull request Aug 17, 2016
@bors bors merged commit e173ead into rust-lang:master Aug 17, 2016
@matthew-piziak matthew-piziak deleted the array-docs-trait-justification branch August 17, 2016 20:11
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.

7 participants