4 ms·
Call me a noob, but I have never been properly introduced to Rust. Does anyone know of a good article or walk through with pros, cons, and examples?
by film42 14y ago
Call me a noob, but I have never been properly introduced to Rust. Does anyone know of a good article or walk through with pros, cons, and examples?
- metajack 14y agoThis is the best talk I've seen on Rust so far. http://www.infoq.com/presentations/Rust http://www.infoq.com/presentations/Rust The tutorial is also pretty good (as are the supplemental tutorials), but they don't yet give you the full picture. For that you'll have to play and experiment and read some code. You might start here for some code to read: https://github.com/pcwalton/sprocketnes https://github.com/pcwalton/sprocketnes
- kibwen 14y agoThe language is still changing so fast that nearly every resource that you'll find will be outdated. Your best bet is likely the official tutorial,[1] which probably doesn't contain too many references to deprecated features. [1] http://static.rust-lang.org/doc/tutorial.html http://static.rust-lang.org/doc/tutorial.html
- ineedtosleep 14y agoWhat parts of the language have been changing? And maybe to reduce the scope of that question a bit: are there any specific features that need to be solidified first before someone should bother learning Rust?
- dbaupp 14y agoRecently the biggest breaking changes have been a large amount of syntax removed from the language: https://github.com/mozilla/rust/issues/4707 https://github.com/mozilla/rust/issues/4707 But, as far as I understand, the goal is to not change the syntax much from now, and actually get it 'frozen' by 0.7.
- usea 14y agoI am no language expert by any means, but I haven't had much trouble picking up Rust. In fact it's been a lot of fun. I've mostly used the official documentation [1](tutorial, manual, core/std reference). Sometimes I will have to look at some unit tests on the rust github source to see how something is used. [1] http://www.rust-lang.org/ http://www.rust-lang.org/
- mcguire 14y agoI started playing with it when 0.5 came out, and the changes that I've seen when I went with a pre-0.6 build are not what I would consider major. There are many of them, but most are either relatively minor syntactic issues or in darker corners of the language that I haven't needed to touch yet.
- steveklabnik 14y agoI wrote a 'book' (it's about 50 pages) you can read online called "Rust for Rubyists". Two things: It's for 0.5 (I'll be updating it to 0.6 later today/tomorrow) and 'for Rubyists' means I assume you don't know anything about systems programming, there's very little that's Ruby-specific. http://www.rustforrubyists.com/ http://www.rustforrubyists.com/
- abraininavat 14y ago'for Rubyists' means I assume you don't know anything about systems programming, there's very little that's Ruby-specific. Then put out the same book with a new title, "Rust for Pythonistas". Two books for the price of one!
- steveklabnik 14y agoI've thought about it. ;) Primarily, this was an experiment in 'selling your byproducts'.[1] I'm already self-publishing a book on Hypermedia APIs[2], and the older system it was in couldn't handle my new requirements. I also wanted to learn Rust, and so I decided to just write it all down as I went. It also enabled me to get familiar enough with my new tooling that when it came time to port over DHAs, it wasn't bad at all. So yes, doing the same thing 'for other languages' would be fun, and if Rust continues to take off, I might give it a shot. I'm already planning on writing more content for the book as I go; I've been working on a Rust buildpack for Heroku... 1: http://37signals.com/svn/posts/1620-sell-your-by-products http://37signals.com/svn/posts/1620-sell-your-by-products 2: http://www.designinghypermediaapis.com/ http://www.designinghypermediaapis.com/
- drbawb 14y agoThis isn't a tutorial, but I found pcwalton's explanation of memory management in rust[0] to be an excellent primer for the different allocation techniques in rust. Learning the different types of pointers was a real pain point for me; so I'm very thankful for this post. Maybe it will help you out while you're learning! [0]: http://pcwalton.github.com/blog/2013/03/18/an-overview-of-memory-management-in-rust/ http://pcwalton.github.com/blog/2013/03/18/an-overview-of-me...
- kibwen 14y agoAnyone who found that post illuminating may also enjoy this general "Rust for C++ programmers" reference: https://github.com/mozilla/rust/wiki/Rust-for-CXX-programmers https://github.com/mozilla/rust/wiki/Rust-for-CXX-programmer...