Can I advise to have a certain constitency in the semantics? Not having ~foo, *foo, Rc<>, Gc<>.
I would rather prefere having ~foo *foo &foo @foo of Something<>foo, other<>foo, Rc<> foo By the way, I like pretty much your pronoums thing, this help understanding :) ----- Gaetan 2013/11/19 Gábor Lehel <[email protected]> > In case this helps, I recently noticed that the sigils correspond to > possessive pronouns: > > '~' => "my", > '&' => "their", > '@' => "our" > > Of course, `@` might be going away, but `Rc<>`, `Gc<>`, and so forth all > (will) have the same intuitive content, only different representations > (among other properties). Similarly `~Foo` and plain `Foo` both mean "my", > while having differences in other areas, in which case yeah, telling you > that `Foo` is stored in-place while `~Foo` is stored on the heap doesn't > help you if you don't know what heap allocation is about. But maybe this is > something. > > > On Tue, Nov 19, 2013 at 10:12 AM, Jordi Boggiano <[email protected]>wrote: > >> On Tue, Nov 19, 2013 at 5:17 AM, Patrick Walton <[email protected]> >> wrote: >> > I've observed a lot of beginning Rust programmers treat the language as >> "add >> > sigils until it works". (I have specific examples but don't want to name >> > people here; however, feel free to contact me privately if you're >> curious.) >> >> I feel like I have to out myself as one of the idiot newcomers that do >> this, just for the sake of the discussion. I have no systems language >> background and frankly never had to consider the difference between >> the heap or the stack in the past 10-some years of writing code. >> >> I don't really think having new vs ~ would help me avoid this problem. >> The issue I believe is that the language looks understandable enough >> for the average joe used to higher level web languages (php, python, >> ruby). That's a great thing of course, that I can just jump in and >> mostly grasp what's going on, while past attempts at C++ tinkering >> quickly ended in tears. It also means that you have lots of people >> that come in and are capable of getting stuff to compile but won't >> necessarily understand the small print. Often there is an alternative >> to pooping sigils all over the code, but if you don't understand the >> concepts behind it it's hard to reason about what those alternatives >> could be. >> >> I think I'm getting better with this over time, and the rust libraries >> also get more usable and consistent leading to less ~ insanity, but >> one thing that would have helped early on is a good warning in the >> docs about this, and a good explanation of what the hell is going on >> (not one geared towards C++ devs using lingo that only low level devs >> are familiar with). >> >> I realize it's no easy task, and that arguably I should probably just >> read a book, but at the same time it's an amazing feat I think that >> the language is so accessible while remaining at such a low level, so >> if we manage to improve the onboarding process it would probably be >> very beneficial. There are tons of web devs that are interested in >> doing things faster/lower level - if only for fun. Maybe it's worth >> having a chapter for them in the docs. I'd happily help review that >> and point out unclear things :) >> >> Cheers >> >> -- >> Jordi Boggiano >> @seldaek - http://nelm.io/jordi >> _______________________________________________ >> Rust-dev mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/rust-dev >> > > > > -- > Your ship was destroyed in a monadic eruption. > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
