Thanks, I already read some parts of documentation. It is good, though I found the navigation a bit confusing. I also looked at the sources for libcore and libstd on GitHub, they are very readable. (Compared to, for instance, STL.)
By the way, I remembered one more question that I had: I am a bit confused about the relationship between core and std. Some of the things defined in core are re-exported in std. For example, std::fmt (https://github.com/mozilla/rust/blob/master/src/libstd/fmt.rs) contains almost only the documentation, while the main implementation is in core::fmt. Would it make sense to have a more defined division between core and std? On Wed, May 28, 2014 at 7:17 PM, Thad Guidry <[email protected]> wrote: > You can also read and search the docs and easily see the Implementors (and > even click on them to get more detailed documentation AND even have 1 click > access to the [src] ) : > > http://doc.rust-lang.org/0.10/std/to_str/trait.ToStr.html > > If you find the docs are lacking a bit, then let the maintainers know (there > is ongoing effort to improve the docs by the way...even a few newly hired > folks at Mozilla). > > > > On Wed, May 28, 2014 at 8:23 PM, Sean McArthur <[email protected]> > wrote: >> >> >> >> >> On Wed, May 28, 2014 at 5:38 PM, Oleg Eterevsky <[email protected]> >> wrote: >>> >>> 3. It seems like almost any string operation requires as_slice(). >>> Can't various string methods be also implemented for String? >> >> >> When writing functions for others to use, you don't want to require them >> to have a String, since that requires a heap allocation. It's free to go >> from String to a slice, but not vice-versa. That said, there's been whispers >> of making String implement Deref, as well passing as arguments to autoderef, >> so you could pass a String and rustc would convert to a slice for you. >> >>> >>> 5. Simple indexing doesn't work for vectors: >>> let a = vec![1, 2, 3]; >>> println!("{}", a[0]); >>> It's a bit surprising... >> >> >> Known issue: https://github.com/mozilla/rust/issues/11875 >> >>> >>> >>> 6. impl ToStr for custom struct fails: >>> error: conflicting implementations for trait `std::to_str::ToStr` >>> note: conflicting implementation in crate `std` >>> Is it a bug? Is Show implicitly assumed for all struct's? >> >> >> This is because ToStr is implemented for all Show implementations. You >> can't implement ToStr, because if you then implemented Show, you'd have >> conflicting implementations. #[deriving(Show)] on your structs is probably >> all you want. >> >> >> _______________________________________________ >> Rust-dev mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/rust-dev >> > > > > -- > -Thad > +ThadGuidry > Thad on LinkedIn _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
