Hacker News new | ask | show | jobs
by dstanko 850 days ago
Do you perceive Rust programmers as extraordinary?
3 comments

Rust is renowned for imposing a high cognitive load on all but the most trivial tasks. This is perhaps the worst traits a programming language can have.
It’s quite the opposite. It may not be worth learning Rust for small simple programs, but it has an entire toolbox of features for dealing with complex problems and large programs.

For example, dealing with multi-threading and low-level memory management without the assistance of thread-safe types and borrow checker adds mental overhead of verifying and upholding all the requirements manually.

You can do that via much simpler message passing instead. No "thread-safe types", no "borrow checkers", no "verifying and upholding all the requirements manually". The downside is you are sacrificing performance.

Rust is for high performance, high concurrency applications where the developer can spend all day building them.

This is a thing people experience at the beginning, but once you get over the hump, for many, it is not descriptive of what it's like.
> This is a thing people experience at the beginning (...)

This is not an onboarding problem. This is a trait of the programming language, which only gets worse as a project grows.

It's high time for the Rust community to start to get honest with themselves and stop pretending problems don't exist. It's already bad enough with the clusterfuck which is async Rust, and you're doing no one any favor to pretend that the borrow checker doesn't add a heavy cognitive load.

> pretend that the borrow checker doesn't add a heavy cognitive load

The borrow checker actively reduces cognitive load once you learn to adopt program designs that mesh well with its requirements. And those happen to be really good program designs across a wide range of axes.

I am sorry that you seem to think you know how I feel better than I do?

The borrow checker means I have to pay less attention to memory management, not more. That’s why it exists. So I don’t have to worry about it. It catches my mistakes, I fix the code, I move on.

I can't speak for others, but it absolutely has made life easier, on both small and large scales.

Actually being forced to think about how long allocations and resources need to live turned random "takes days to figure out" bugs into an instant response of "oh, that was stupid of me to try doing that huh? Guess I'll try something else"

Rust is memed for that by people who don’t actually program Rust.

In practice it is absolutely the opposite. Rust makes really challenging problems extremely tractable, and takes an enormous amount of mental overhead off the table.

That cognitive load around ownership and sharing already existed in C and even assembly, we were just managing it very poorly without tooling.
> Rust is renowned for imposing a high cognitive load on all but the most trivial tasks.

By whom exactly? I think it's actually the exact opposite. It completely frees you from having to think about entire classes of bugs.

> By whom exactly?

You didn't read the article, didn't you?

Did you? It doesn't say anything about the respondents. "respondents that self-identify as a Rust user" is completely useless. Are they professional programmers? Are they just beginners playing with it? Do they know the language well enough to make an assessment?
I don't think GP meant that as "of extraordinary ability" just "tackling the common problems people write code for". Ordinary problems vs ordinary people.
extraordinarily masochistic, yes