TWiR quote of the week

Slightly OT here, but should that compile error say something about self-referential structs?

1 Like

Figuring out the exact conditions is probably difficult, but I think it would be a good idea.

1 Like

Sage advice for anyone programming in Rust: first get it working correctly, then measure, then tune performance only if necessary.

7 Likes

from IRLO

14 Likes

You want to be looking into languages that tell you not "programming is so easy with me" but "programming is actually fiendishly hard but I'm going to try my best to help you get through it in one piece."

Bodil Stokke on twitter

12 Likes

Rust has a curse (it has many, but this one is critical): inefficient code is generally visible. Experienced developers hate to notice that their code is inefficient. They will recoil at seeing Arc<RefCell<T>> , but won't bat an eye at using Python.

by ekuber

26 Likes

The whole post is worth reading, I'd say :slightly_smiling_face:

  • for those wanting to discuss about it / challenge that assertion, the quote of the tweek thread is not for that. Instead, take advantage of there being a dedicated thread for it.
3 Likes

Unfortunately it's from the survey, so I don't know who to attribute it to, but this made me chuckle:

[...] clippy is for people who find a certain emptiness inside when they finally get code through the compiler. :wink:

22 Likes

Just because Rust allows you to write super cool non-allocating zero-copy algorithms safely, doesn’t mean every algorithm you write should be super cool, zero-copy and non-allocating.

trentj on URLO

10 Likes

And it's true that a lot of stuff requires a "sufficiently smart compiler" but really it's 2020, if your compiler isn't serving you breakfast in bed you need to be upping your expectations.

-- Jubilee on the Rust Zulip

12 Likes

Historically, C has been the best fit for these applications just because it so lean: by providing essentially nothing other than the portable assembler that is the language itself, it avoids the implicit assumptions (and girth) of a complicated runtime. But the nothing that C provides reflects history more than minimalism; it is not an elegant nothing, but rather an ill-considered nothing

-- Bryan Cantrill on what no_std is competing with

10 Likes

Alternative title: mediocre C++ is arguably worse than mediocre rust.

I’d agree with that? I think the power and danger of C++ is that it assumes the programmer knows best. Rust assumes the programmer is wrong if it looks dangerous. So.. yes?

By sesuximo in https://news.ycombinator.com/item?id=24817594

4 Likes

Think of it like this: When Rust passes control to C it's like you jumping into a pit full of vipers in the hope that none of them bytes you. I might put up a sign "unsafe, vipers in pit".

ZiCog in Does Rust offer C interop? - #4 by ZiCog

6 Likes

We need all that knowledge of what the problem space looks like to evaluate if a simple API is good enough, but we do not necessarily need all that knowledge reflected directly in the API surface.

Ralf Jung on the Safer Transmute RFC


To me this feels like a core insight on effective API design: map out the problem space, survey existing approaches, create a minimal solution. Then iterate from there.

10 Likes

At least let's please keep one single language that doesn't allow the perpetually-reinforced sloppiness.

H2CO3 here:

I was writing some code today and had to pass a closure with an arg I didn't need: |_| .

I thought "That looks kind of like a TIE fighter, we should adopt the habit of calling them that." But then I realized, no, a TIE fighter would be |o| .

Instead, I think it more closely resembles an Imperial shuttle as it is landing. And do you know what class those shuttles are?

Lambda.

George Lucas was truly a visionary... on /r/rust

19 Likes

Like other languages @rustlang does have footguns. The difference is that we keep ours locked up in the unsafe.

Ted Mielczarek on Twitter.

28 Likes

There are no bad programmers, only insufficiently advanced compilers

Esteban Kuber on Twitter

10 Likes

I see a very sharp knife; but this knife is completely and utterly shrouded and encased in tamper-proof, child-proof, thief-proof hardened and sealed plastic shells. Yes shells as in the plural of shell. These shells are even adult-proof too, where the adult is a generic engineer trained generally in other languages only.

Levi Lovelock in hist blog : Rust from a Gopher - Lessons 3 & 4 - LevPaul88's Place

4 Likes

I personally feel that ownership semantics is a handrail on the design space that will guide you to a clear and simple design. If you come from an OOP background, this will feel limiting, but it's not a bug, it's a feature.

-- llogiq @ https://www.reddit.com/r/rust/comments/jocevb/the_fatal_flaw_of_ownership_semantics/gb7hmc8/

9 Likes