TWiR quote of the week

It can seem overwhelming when starting to learn Rust, because some of the stuff you need to be productive is more complex than in C++ (e.g. the borrow checker) so the initial curve from zero to productive is steeper, but it soon becomes second nature and then it's smooth sailing. Whereas in C++ it's easier to get started but you'll be sailing in a stormy sea with monsters (who want to segfault you) from the start, and have to spend a lot of time debugging..

@Boscop on reddit https://www.reddit.com/r/rust/comments/8qkv6a/im_worried_were_going_to_reach_c_levels_of/e0kel9x/

13 Likes

(Update: It's from https://github.com/rust-lang/rfcs/pull/2457#issuecomment-396811743)

2 Likes

it seems like by making my function use AsRef, i gain the ability to pass all kinds of crap into it, but not a simple refernece

-- jamadazi on #rust-beginners (unlogged channel, permission to quote given)

7 Likes

In Rust it's the compiler that complains, with C++ it's the colleagues

By Vorner on the Gitter channel. rust-lang/rust - Gitter

19 Likes

Rust has good reason to be damn proud of our good friend borrowck! She always has our back when it comes to things like data races or reference invalidation, and while she might seem an aloof mistress to the uninitiated, she is actually much like a loving mother, keeping us all safe & sound.

@llogiq on Reddit: https://www.reddit.com/r/rust/comments/8qvcqe/systems_languages_an_experience_report/e0mmpmm

3 Likes

@vitalyd channeling respect, code safety and learning in the discussion How (not) to use unsafe code, truly showing the best that the Rust Community has to offer!

8 Likes

Starting with the rust 2018 preview, if one of your dependencies isn't sufficiently crate, you can import it with the following syntax to make it up to 100% crater than the default:
crate extern crate foo;

/u/ben0x539 on /r/rust

15 Likes

From deep in the bowels of internals.rust-lang.org Centril brings this nugget of wisdom:

I think the notion that you can add dependent types without changing / expanding the mental model is mistaken personally.

From @eugene2k:

Freedom to shoot yourself in the foot is not a rust marketing point :wink:

Source: Why can't I increment a variable like this? - #14 by eugene2k

17 Likes

If only rustc could check my comments as thoroughly as it checks my code

/u/asbananasasyousay

15 Likes

From @mbrubeck on IRC on why there are no nightlies for the last 4-5 days:

bors lives at the north pole, so near the summer solstice it's never night, hence no nightlies

21 Likes

@skymuse From skymuse in this Rust users forum:

8 Likes

actix-web has removed all unsound use of unsafe in its codebase. It's down to less than 15 occurences of unsafe from 100+.

Title of the /r/rust thread celebrating this commendable achievement.

(Thanks /u/_ar7 , I agree that after the shitstorm actix-web received, we should also spread the love)

18 Likes

What we’ve seen is a huge shift in our capacity to make point releases, rather than a shift in the necessity of making point releases. This doesn’t seem to me like a cause for concern.

@withoutboats on internals

A good nugget on the reason for the (percieved) increase in point releases recently.

2 Likes

References are not pointers, but temporary locks on data.

(Kornel in Cannot move out of borrowed content take 2 - #6 by paziv )

8 Likes

matklad in the internals forum

11 Likes

Felix91gr summarizes the (lack of) difference between C++ and Rust

15 Likes

I love the language. And I actually feel like I’m more productive in it than in other languages.

It seems to be a good week for Rust-is-great one-liners :slight_smile:

@worik sharing his experience of learning rust :heart:
(The entire post is a gem, really capturing the rite-of-passage of fighting with, then learning to love, the borrow-checker)

8 Likes

We put in a lot of work to make upgrades painless; for example, we run a tool (called “crater”) before each Rust release that downloads every package on crates.io and attempts to build their code and run their tests.

-- What is Rust 2018?

Kinda amused me -- imagine any language trying to compile every package in its ecosystem. Brb downloading the internet.

8 Likes