+1 在 2013年11月19日 下午8:27,"Gaetan" <gae...@xeberon.net>写道:
> "The most common use case for owned boxes is creating recursive data > structures like a binary search tree." > > I don't think this is the most common use of owned boxes: string > management, ... > > I don't think it a good idea to place "binary search tree" in a tutorial. > You don't do this every day :) > > ----- > Gaetan > > > > 2013/11/19 Gaetan <gae...@xeberon.net> > >> In the french presentation for rust 0.8 [1], the author gives the analogy >> with C++ semantics >> - ~ is a bit like unique_ptr >> - @ is an enhanced shared_ptr<T> >> - borrowed pointer works like C++ reference >> >> and I think it was very helpful to better understand them. I don't know >> if it is true or now, but this comparison helps a lot understanding the >> concepts.You can present them like this, and after, add more precision, and >> difference with the C++ counter parts. >> >> A tutorial to make would be "Rust for C++ programmer" :) >> >> >> [1] http://linuxfr.org/news/presentation-de-rust-0-8 >> >> ----- >> Gaetan >> >> >> >> 2013/11/19 Daniel Micay <danielmi...@gmail.com> >> >>> On Tue, Nov 19, 2013 at 4:25 AM, Gaetan <gae...@xeberon.net> wrote: >>> > I don't think there is any particular issue with the tutorial, but we >>> need >>> > more "recipes" on how to handle typical situations. >>> >>> I'm specifically talking about the `Boxes` section in the tutorial and >>> not the whole picture. I keep hearing that the coverage of `~` it's >>> confusing - so can someone elaborate? >>> >>> Rewriting the coverage of boxes and references by walking through the >>> implementation of some data structures is something I'm willing to do, >>> but in my opinion that section is now quite good, other than being dry >>> and not presenting interesting code samples for the use cases it >>> describes. >>> >> >> > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev