Most active commenters
  • troad(4)

←back to thread

177 points signa11 | 15 comments | | HN request time: 1.995s | source | bottom
1. troad ◴[] No.42161064[source]
I think it's telling that whenever someone raises concerns about any element of Rust, no matter how constructively, they're always met with a wall of "you must not truly get the borrow checker," or "you're using Rust wrong," or "stop trying to write <C/C++/Java/etc> in Rust!", usually with zero evidence that that is in fact what is happening. There's never anything to improve on Rust, it's always user error / a skill issue. If there ever surfaces any audio of Linus Torvalds and Ken Thompson discussing the pros and cons of the borrow checker, I expect a sea of patronising anime avatars to show up, seeking to explain Rust's invention of the concept of ownership to them.

Rust is really nifty, but there are still (many) things that could be improved in Rust, and we'd all benefit from more competition in this space, including Rust! This is not a zero sum game.

Honestly, I also think many people just want a nice ML-like with a good packaging story, and just put up with the borrow checker to get friendly C-like syntax for the Option monad, sum types with exhaustive matching, etc. This is a use case that could very much benefit from a competitor with a more conventional memory model.

replies(7): >>42161186 #>>42161243 #>>42161255 #>>42162270 #>>42162593 #>>42162641 #>>42162713 #
2. NoboruWataya ◴[] No.42161186[source]
No one thinks there's nothing to improve in Rust, there are lots of features it is missing, some of which are in nightly or on the roadmap. But the borrow checker and the concepts that underpin it are pretty fundamental to Rust and what separates it from other languages. If you like Rust except for the borrow checker, then I would think you don't really like Rust.
replies(1): >>42161361 #
3. __float ◴[] No.42161243[source]
I can't help but feel this is a somewhat veiled complaint about the Rust community instead of anything substantive with the language :/
replies(1): >>42161318 #
4. kstrauser ◴[] No.42161255[source]
I am A-OK with someone not liking Rust. I do, but it’s still only my 3rd-most used language behind the Python and TypeScript I write at work.

It’s just that time after time I’ve heard people criticize Rust because they were, in fact, trying to write their pet language in Rust. It’s similar to how many complaints I’ve heard about Python because “it’s weakly typed”. What? Feel free not to like either of them, but make it for the right reasons, not because of a misunderstanding of how they work.

Now, the author of this post may be doing everything right and Rust just isn’t good at the things they want to use it for. The complaint about constantly bumping against the borrow checker leads me to wonder.

replies(1): >>42161390 #
5. troad ◴[] No.42161318[source]
Veiled? :P

I'd characterise it as a gentle criticism of the way the Rust community tends to react to anything other than effusive praise.

Rust is a nifty language, albeit with room for improvement, that falls into the (sadly overpopulated) category of 'neat thing, somewhat obnoxious fan club'.

replies(1): >>42163210 #
6. troad ◴[] No.42161361[source]
> If you like Rust except for the borrow checker, then I would think you don't really like Rust.

The sentence in my original post that this addresses is supportive of the emergence of an alternative language to Rust for people with this use case, so I think we're just agreeing. (Although I wouldn't go so far as to tell others what they do or do not like based on my own ideas of what is essential and what isn't.)

7. troad ◴[] No.42161390[source]
> It’s similar to how many complaints I’ve heard about Python because “it’s weakly typed”. What? Feel free not to like either of them, but make it for the right reasons, not because of a misunderstanding of how they work.

Are you sure you're not just being harsh to people whose grasp of CS vocab is weaker than yours? If someone tells me that Python is 'weakly typed', I translate it in my head to 'dynamically typed', and the rest of their complaint generally makes sense to me, in that the speaker presumably prefers static typing. Which is a valid opinion to hold, not necessarily the result of any misunderstanding.

replies(1): >>42161462 #
8. kstrauser ◴[] No.42161462{3}[source]
Reasonably sure. If it’s clear they actually mean dynamically typed, fine. That’s down to preference, and I won’t say they’re wrong any more than I’ll argue that chocolate is better than strawberry.

However, I’ve heard lots of utterly wrong criticisms of Python (and Rust and…) that were based on factual misunderstandings and not just a vocabulary mistake.

9. ordu ◴[] No.42162593[source]
> whenever someone raises concerns about any element of Rust, no matter how constructively,

I don't think that it is a very constructive article. The author's critique of Rust raises questions like "how to do it better" but there are not answers.

> they're always met with a wall of "you must not truly get the borrow checker,"

Yeah, it is frustrating in this case particularly. The author openly states that he doesn't want to learn all the quirks of the borrow checker, and people respond to it with "you just don't get the borrow checker". I can see how this answer could be helpful, but if it was expanded constructively, if there was an explanation how it can become easy to deal with problems the author faces if you understood the borrow checker. OTOH I cannot see how such an argument can be constructed without a real example with the real code and the history of failed changes to it.

I personally feel, that the borrow checker is simple, if you got it. And the author's struggles just go away, if you got it. You can easily predict what will happen if you try this or that changes to the code, and you know how to do something so the borrow checker will be happy. But I cannot elaborate and to make it clear how it works.

10. chipdart ◴[] No.42162641[source]
> I think it's telling that whenever someone raises concerns about any element of Rust, no matter how constructively (...)

I'm far from a Rust expert, but to me if someone is whining about how it is hard to track lifecycle rules of an object because they are passing it through long chains of function calls across all sorts of boundaries, what this tells me is that you're creating your own problems that you could avoid if you simply passed the object by value instead of by reference. I mean, if tracking life cycles is a problem then why not prevent it from being a problem? Not all code lives in the hot path. I'm sure your performance benchmarks can spare a copy somewhere.

replies(1): >>42163643 #
11. dathinab ◴[] No.42162713[source]
> zero evidence

you mean except the original poster often implying exactly that in their articles or the personal experience of the commenter that nearly always whenever they ran into borrow checker problems it was due to exactly that reason

> There's never anything to improve on Rust, it's always user error / a skill issue.

RFCs get accepted and implemented nearly every week, like in any language there is always a lot to improve

the problem is that the complains of such articles are often less about aspects where you can improve things but more about "the borrow checker is bad" on a level of detail which if you consider the borrow checker a fundamental component basically is "rust is fundamentally bad"

replies(1): >>42163005 #
12. ramon156 ◴[] No.42163005[source]
Yes, and that's why the comments usually are in some sense "you don't use the BC right", because they don't want a BC. And that's fine, but you can't blame Rust for this
13. akkad33 ◴[] No.42163210{3}[source]
There are improvements to the borrow checker that is in the roadmap for Rust 2024. So it's not like the "community" is claiming there are no issues
14. brabel ◴[] No.42163643[source]
> I mean, if tracking life cycles is a problem then why not prevent it from being a problem?

So you're suggesting that people should just wrap everything in Arc or make copies everywhere to avoid lifetimes? At that point why not just use Java/OCaml/Swift/your-favourite-GC-lang?

replies(1): >>42164417 #
15. chipdart ◴[] No.42164417{3}[source]
> So you're suggesting that people should just wrap everything in Arc (...)

You're the only one who managed to come up with this nonsense. No one else did, and clearly you did not pick that from what I wrote because I definitely did no wrote that.

Please refrain from slippery slope fallacies.