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
