News for hackers. Stuff that matters.
Re:Why Rust? [pdf] by Animats on Wednesday September 09, 2015 @01:31PM (#10192764)
The book is exactly what it says it is. "Why Rust", an argument for Rust. 50+ pages. It's a fun read, but not too useful. My own comment on Rust is that the borrow checker is brilliant, and we'll see that again in other languages. The type/generic system picks up where C++ left off, and is very complex. But that may get better as the mess settles down and gets better documentation.

We now need a "programming in Rust" book which is not by one of the Rust developers, who are too close to the design.

Re:Why Rust? [pdf] by kibwen on Wednesday September 09, 2015 @01:49PM (#10192888)
Jim Blandy may work for Mozilla, but otherwise he has no connection to the Rust project (nor Servo). He has not been involved in any of the design discussions, and his only commits to the Rust repo are four minor documentation fixes.

I've assisted Jim in giving presentations on Rust at OSCON this year, and trust me when I say that he has no qualms about criticizing the language when he sees fit. His perspective is definitely that of an outsider's, and like you I agree that that's ideal from a pedagogical point of view.

Re:Why Rust? [pdf] by humanrebar on Wednesday September 09, 2015 @02:42PM (#10193324)
> The type/generic system picks up where C++ left off, and is very complex.

That's not entirely true. There are some mechanisms that you can't really do in C++, at least not without a lot of boilerplate. And Rust's generics aren't quite as powerful (as in metaprogramming) as C++'s yet. I hear they're working on it, though.

Re:Why Rust? [pdf] by jfoutz on Wednesday September 09, 2015 @03:50PM (#10194010)
I know they're working on higher kinded types, i think there's some fancy template-template syntax you can use in c++ to get the same effect.

It's easy to define a list of integers in pretty much any language,

    class IntList { void addInt(){...} }
Most languages let you make a generic List,

    class List<T> { void add(T){...} }
The thing that's cool about HKT, is it lets you swap the other side,

    class T<Integer> { T operate(Integer) }
So you can deal with a Set or a List or an Optional or whatever might want to deliver integers. It seems a little goofy, but it's sort of like a Super Lambda. an anonymous function can only really do its one thing, but this lets you bundle a bunch of related lambdas together, so if you have, say Pay, you can group together all the different types of tax that are applied to pay, calculate total tax, etc. And it works over whatever random data structure you want

It seems a little crazy at first, but with clean syntax, it's a fantastic way to split the work apart from the way the data is represented.

Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @01:32PM (#10192770)
This little book is basically promotional material for Jim's bigger book, which, at least from the blurb, sounds exactly like what you're looking for.
Re:Why Rust? [pdf] by sanderjd on Wednesday September 09, 2015 @03:44PM (#10193927)
Thanks for clarifying that, I'll be excited to read his book when it comes out. Also looking forward to grabbing a paper copy of yours – thanks for making that happen!
Re:Why Rust? [pdf] by stock_toaster on Wednesday September 09, 2015 @04:06PM (#10194157)
Was there an announcement of a paper edition of the rust lang book somewhere?
Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @04:15PM (#10194233)
Re:Why Rust? [pdf] by stock_toaster on Wednesday September 09, 2015 @04:45PM (#10194446)
That's awesome! Looking forward to it coming out. :D
Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @04:52PM (#10194496)
Thanks!
Re:Why Rust? [pdf] by mannykannot on Wednesday September 09, 2015 @02:27PM (#10193191)
This book may be useful to people learning C or C++, as a primer on the some of the issues you have to think about if your code in those languages is to be reliable.
Re:Why Rust? [pdf] by pcwalton on Wednesday September 09, 2015 @02:30PM (#10193224)
Jim Blandy wasn't involved in the Rust design.
Re:Why Rust? [pdf] by gnuvince on Wednesday September 09, 2015 @03:24PM (#10193685)
I don't think he was implying that; he was saying that there needs to be a book "Programming in Rust" written by someone outside the Rust projects, e.g. like Dave Thomas and Andy Hunt did with the Pickaxe book for Ruby back in the early 2000s.
Re:Why Rust? [pdf] by pcwalton on Wednesday September 09, 2015 @03:48PM (#10193983)
Jim is outside the Rust project, other than working for the same employer as many of the Rust developers.
Re:Why Rust? [pdf] by kibwen on Wednesday September 09, 2015 @03:32PM (#10193778)
And I think pcwalton is saying that Jim Blandy is very much from outside the Rust project, and therefore satisfies that criterion. :)
Re:Why Rust? [pdf] by gnuvince on Wednesday September 09, 2015 @03:40PM (#10193876)
Then I guess the OP had another definition of "book" in mind. However, I'll say this: if Jim wants to write a complete book on Rust, I'd love to buy it. I'm more than halfway through his report and it has exactly the tone that I'm looking for in a programming book: clear, logical progression, to the point and no excessive humour that some books suffer from (I'm reading a book on Go (the game) at the moment and every paragraph contains a self-deprecating joke. It gets old after 2 or 3.)
Re:Why Rust? [pdf] by kibwen on Wednesday September 09, 2015 @04:22PM (#10194283)
To expand on steveklabnik's sibling comment, Jim Blandy's is writing a complete book on Rust, which will be published by O'Reilly, and is aiming for release by the end of the year. :)
Re:Why Rust? [pdf] by steveklabnik on Wednesday September 09, 2015 @03:52PM (#10194036)
Re:Why Rust? [pdf] by rancur on Wednesday September 09, 2015 @01:57PM (#10192959)
> "programming in Rust"

* what kind of animal should it have on the front?

* will it tell me 8 different, confusing, obsfucated ways to do something that would be much faster with printf?

* will it do that in chapter 1?

* ???

* profit?