A half-hour to learn Rust
141–150 of 150 posts
Re: A half-hour to learn Rust
#142this: teaching material should give immediate confidence to apply learned material and - refine it later.
excellent write up
Re: A half-hour to learn Rust
#143Earlier quoted context omitted.
None of them. The concept is fundamentally flawed. It's as if everything you ever read about C was all about bitwise manipulation operations, on and on and on about bitwise manipulation, to the point not-C programmers think the language is primarily about bitwise manipulation and people start porting bizarre misunderstandings of bitwise manipulation into other languages and claiming they're just like C now, when it's…
However, the c community never felt like going on and on and on about bitwise manipulation... Anyone have any idea why people get so hung up about explaining monads?
Re: A half-hour to learn Rust
#144I want books written like this. I've had too many books where I die of boredom over and over again in the first 150 pages and then I never read them again. It's like there's some rule saying books must be super wordy.
That rule is usually called the publication contract, and it usually literally says how big the work needs to be, even if you can say it better in fewer words/pages/chapters/etc.
Re: A half-hour to learn Rust
#145This is very good but... Description of traits suddenly dumps references, mutable references, reference bindings, dereferencing with zero explanation: --- start quote --- Trait methods can also take self by reference or mutable reference: impl std::clone::Clone for Number { fn clone(&self) -> Self { Self { ..*self } } } --- end quote --- What? What does this even mean? What is self, and why ? Too many questions, not…
T { ..t }
which means "a new T with all the fields set to their values in t".Inside the trait "Self" is an alias for "Number".
"&self" is shorthand for "self: &Number", i.e., a reference to Number.
To dereference a reference, prefix with
*
So: self
has type "&Number"and
*self
has type "Number".Thus,
Self { ..*self }
is creating a new instance of Number with its each set to the same value as self.Disclaimer! everything I know about rust I learned 2 days ago from this blog post, so I might be wrong :-)
Re: A half-hour to learn Rust
#146Earlier quoted context omitted.
That rule is usually called the publication contract, and it usually literally says how big the work needs to be, even if you can say it better in fewer words/pages/chapters/etc.
TIL. This seems to be waste of paper/time for consumers. What is the incentive for publishers by preferring wordy version than terse one? Is it because they afraid of being perceived as not worthy enough to be a book?
Re: A half-hour to learn Rust
#147Serious question; why aren't we all using Rust?
Certainly I can do pretty much everything I need to with C/Python/Go because I accept the tradeoffs and know enough to work around the safety/security issues.
(But Rust is on my list of things to get around to in 2020.)
Re: A half-hour to learn Rust
#148This is the most useful introduction to a language I have ever read. Often language introductions produce a "Wall of Complexity" and I failed in my last two attempts learning Rust failed because of that. This is just great. Be warned, the "half hour" part is probably a bit like "99 cents" as a price tag. I've already spent more than that, but it is time well spent. Thanks for writing this!
> Be warned, the "half hour" part is probably a bit like "99 cents" as a price tag. I've already spent more than that, but it is time well spent.
> Thanks for writing this!
Re: A half-hour to learn Rust
#149This is the most useful introduction to a language I have ever read. Often language introductions produce a "Wall of Complexity" and I failed in my last two attempts learning Rust failed because of that. This is just great. Be warned, the "half hour" part is probably a bit like "99 cents" as a price tag. I've already spent more than that, but it is time well spent. Thanks for writing this!
> This is the most useful introduction to a language I have ever read. Often language introductions produce a "Wall of Complexity" and I failed in my last two attempts learning Rust failed because of that. This is just great. > Be warned, the "half hour" part is probably a bit like "99 cents" as a price tag. I've already spent more than that, but it is time well spent. > Thanks for writing this!