> I'm a weekend wannabe systems programmer
> and was attracted to Rust from Ruby because C scares me
I myself was attracted from Javascript for the same reason, you're among friends. :) > this is where Go users laugh that Rust attracted a
> Rubyist instead of a C++ user
I don't think anyone's laughing at anybody. Different languages will appeal to different people, we don't need to begrudge anyone for that! > I'll have to research C++ lambdas some more but given
> the safety, usability and performance gains
Performance of Rust closures should be the exact same as C++ lambdas. Safety-wise, you get all the usual guarantees of Rust. Usability-wise, the main nicety of Rust closures over C++ lambdas is that Rust doesn't force you to specify a capture clause, and instead infers how to capture all of the closed-over variables based on context. I think that Rust may actually be strictly less powerful than C++ here (as C++ allows you to explicitly specify the capture mode for each and every upvar if you like), but we believe that you'll have all the power you need in practice. Whether or not this turns out to be true will have to be determined by experience.I would say that such people may be broader than "Go users," but my "Rust for Rubyists" was one of the very first community tutorials for the language, and Cargo takes a lot of inspiration from Bundler, given that both were written by Yehuda. :)
Rust actually has quite a few Ruby/Python people, for exactly what you say:
> C scares me
This is basically what wycats said about himself in his GoGaruCo talk about Rust: https://www.youtube.com/watch?v=ySW6Yk_DerYTL;DR: People migrate from all kinds of places to all kinds of places. :)
Thanks for Rust for Rubyists, I remember reading it a while back. I should also thank you for the official Rust docs, which are a lot more robust now.
I love the fact that systems programming is becoming attractive again!
> this is where Go users laugh that Rust attracted a Rubyist instead of a C++ user
The members of the Rust community have very diverse backgrounds, so don't feel bad. We have systems programmers, pure FP folks, game devs, folks from the dynamic/web crowd... this is an encouraging thing! You will not be alone in coming from a dynamic language - some of our best contributors are also experienced Python, Ruby or Racket developers.
That would be the pot calling the kettle black.