#rustlang people-- link me to your favorite explanation of slices? what they are & why/when you'd use them or not?
-
-
Replying to @Carols10cents
http://doc.rust-lang.org/book/primitive-types.html#slices … explains the syntax, https://github.com/rust-lang/book/blob/master/src/slices.md … gets more in depth
1 reply 0 retweets 1 like -
Replying to @Carols10cents
Might send some ideas in to that chapter... it's close, but I think I'm looking for an intersection of slices and ownership?
1 reply 1 retweet 1 like -
Replying to @Carols10cents
And the tradeoffs of allocating a new String or T vs. returning a slice?
2 replies 0 retweets 1 like -
Replying to @Carols10cents
@Carols10cents 10¢ … If you can, return a slice; the caller can clone. Harder: Do you allocate and return or accept an &mut buffer?4 replies 0 retweets 1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.