TWiR quote of the week

To be fair, expecting self-driving cars in 2021 to drive anywhere and in any weather conditions without driver's intervention is like expecting rustc to write safe programs for you while you watch Netflix. Also, an analogy is just that - an analogy.

Rust reigns supreme as most loved.

6 Likes

By @curoli. There's a lint for that.

8 Likes

From How to write really slow Rust code (from TWIR some time ago):

Writing code in Rust doesn’t mean your code will be blazing fast. It’s easy to make mistakes and get quite slow performance.

1 Like

.

6 Likes

It's five months old, but I encountered this quote today and don't remember seeing it in here back then.

Code doesn't deal with resources until it does. Similarly with everything else that forces you to reason about control flow - you don't care about thread management until you do, you don't care about action logs until you do, you don't care about performance until you do... and from the other side, code doesn't need to be exception-safe until it does. The trouble with this kind of "magic" language feature is that correctness becomes non-compositional: you can take two working pieces of code and put them together and get something that doesn't work.

-- lmm (Mickey Donaghy) @ > Not all code deals with resources. Streaming parsers normally don't. When you ... | Hacker News

(The full name was found by following the "this is also me" in the YCombinator user profile to the associated GitHub profile.)

I've never seen Rust's "complexity" put both from that angle and as succinctly as those last two sentences.

10 Likes

From a zulip thread i started by Lokathor

Note: function pointers are not always aligned, though some platforms may have them be aligned

Anyway: the standard library docs say "check the nomicon"
then the nomicon says "here is some advice and ultimately we don't know, maybe check UCG"
then UCG says "ultimately we don't know it's probably like this but there's no RFC yet"
then Ralf says "probably it should be allowed if the layout matches".

I found this pretty funny and sad.

Not sure whether to include the first sentence or not, you decide :slight_smile:

9 Likes

From @H2CO3 in Rationale behind Fn, FnMut and FnOnce design

9 Likes

From the russian telegram chat room Telegram: Contact @rust_offtopic

Original:

Кстати я знаю чем занимается борроу чекер
Чекает не свихнулся ли ты еще

In English:

By the way i know what borrow checker does
Checks to see if you're still crazy

1 Like

Isn't the translation inverted? "Не свихнулся ли ещё" literally means "isn't crazy yet".

Both are correct in their own way. The craziness is UB.

1 Like
Edition!

From: Rust 2021 Edition - YouTube

6 Likes

A huge :orange_heart: of Rust is "you're holding it wrong" is considered a language bug.

6 Likes

Hot take: Rust isn't as hard as it's detractors think it is, and it isn't as easy as we want it to be. But I think we have a better chance of becoming easier to use than easier use languages becoming lower level without compromises.

Link

7 Likes

I think Rust being difficult is like saying you had good parents because they let you play with knives. Rust may seem hard at first but borrowck is just looking after you.

To elaborate writing a fast and memory safe multi-threaded webserver is easy in Rust; if it compiles it works, but difficult in C since while it may be easier to get it to compile it might not work correctly.

2 Likes

the strains of the project have hurt a lot of people over the years and I think maybe the only path to recovery involves getting some distance from it.

Graydon Hoare on Twitter

2 Likes
1 Like
2 Likes

He devoted his talk to not trolling,

"That's enough about languages that suck, let's talk about C++" - Miguel Young de la Sota speaking on Rust's handling of Pin before talking about C++ at RustConf 2021

4 Likes
https://users.rust-lang.org/t/common-newbie-mistakes-or-bad-practices/64821/46
1 Like