top | item 34226989

(no title)

aussiesnack | 3 years ago

> > Rust is harder than any other mainstream language to do that in.

> I’d argue C and C++ are both harder. It’s hard to even get these to build once you move past trivia examples (including libraries etc).

Agree I overstated that. What I mean is that, out of the difficult to learn languages, Rust is the only one whose community for opaque reasons denies the difficulty.

> Some of us just didn’t find it that hard.

Why the difference I don't know. So far everyone I know who has learned it has dropped out because they just couldn't get practical traction with it. My guess is that most people who say they don't find it hard are either longstanding C/C++ programmers, and/or are learning at work where they have immediate help & scaffolding.

What is odd is that rather than responding to difficulties with a curious "Oh, I didn't find it hard, I wonder where the difference lay", Rust advocates tend to come back with an aggressive 'proof' that Rust is factually not hard to learn (with implications we can all guess at). No other programming community frequently does this in my experience (and I have brushed against many). That community attitude itself must have causes that are worth thinking about.

discuss

order

pjmlp|3 years ago

I know C and C++ since the mid-90's, and have delivered several products into production with them, still have issues today when dealing with some cases where the borrow checker should be fine (from human borrow checker point of view), but it doesn't get it.

There are also these patterns one has to learn like applying references to numbers in some corner cases, e.g. func(&123), and the fact polominus is being developed shows there is still room for improvement on the borrow checker logic.

nicoburns|3 years ago

> My guess is that most people who say they don't find it hard are either longstanding C/C++ programmers, and/or are learning at work where they have immediate help & scaffolding.

Neither of those were the case for me. In fact, I'd previously tried and failed to learn C (to a level where I could achieve something useful). I did learn at work, which gave me time as I was able to work on it full time, but I had no help available as nobody else at the company knew Rust at the time.

> Rust advocates tend to come back with an aggressive 'proof' that Rust is factually not hard to learn (with implications we can all guess at). No other programming community frequently does this in my experience (and I have brushed against many). That community attitude itself must have causes that are worth thinking about.

I somewhat agree this behaviour isn't great. I suspect the cause is a whole bunch of people saying that Rust is too hard, and that the industry therefore shouldn't bother with it.

Factors I'd guess at:

- Previous experience with a language that uses functional patterns is a huge plus. Even if that's very lightweight functional patterns like you might find in JavaScript or Kotlin (past exposure to something like Haskell or Scala would be even better). - Previous experience with C++ helps. Especially if you write "modern" C++ with smart pointers, etc as this is rather close to how Rust works. - C experience can be a positive or a negative. If you are the sort of C programmer who is hyper aware of object lifetimes and programs carefully and defensively it'll likely help. If you're the kind of C programmer who likes to play fast and loose with safety so long as it works in practice then it'll likely hinder as you'll expect to be able to do things that you can't. - Java/C# and other strongly OOP languages can make learning Rust harder. OOP code tends to be full of graphs of objects that all point to each other, and you just can't do this in Rust. So if that's how you're used to programming your going have to completely relearn how to structure code.

And I guess some of it's just going to be how comfortable people are with abstraction. Rust is definitely heavier on the mathier side of programming (with a sophisticated type system, etc). Personally I find that makes it easier not harder than languages like Go and C which are much simpler in this respect, as when reading code in those languages I often find it hard to pick out those forest from the trees. But from what I've seen, programmers are pretty split on their preferences on this issue, and I imagine for some people this would make it harder.

aussiesnack|3 years ago

> I suspect the cause is a whole bunch of people saying that Rust is too hard,

Perhaps, though I haven't myself witnessed anyone saying it's 'too hard'. Just that people (like me and everyone I know who's tried to learn) find it 'hard'. Then we're informed it's not.

My thought about the underlying reasons was more along the lines of the Rust community's inclusion ethic. I find that entirely laudable in general. But like all ideologies it can lead to blind spots when insisted on against evidence. For example, it's even built into the (plainly false) official tagline: "A language empowering everyone to build reliable and efficient software." If someone finds Rust difficult, this creates a strong cognitive dissonance in fierce Rust advocates (for some reason so many are), which evokes vigorous denial.

> Previous experience with a language that uses functional patterns is a huge plus

My previous two 'learn for interest' languages were Clojure and Elixir. I could do more in both after a week than after some months of Rust.

In my case it's not unfamiliarity nor abstraction, but the sheer complexity that bleeds right through the ecosystem. For example: something I experience every time I try to do anything 'real': I search for the most common/recommended relevant library, go to its docs and find them utterly incomprehensible. It then takes days to glean enough to use the new library fluently. Even reading commandline args - detailed but conceptually simple - leads to a vastly complex horror of a library (I won't name names) that takes days to decipher. It's never taken me more than an hour or two in any other language. My Rust projects slow to a stupefying crawl.

For all that, I'm persisting (or rather re-starting, as my attempt earlier this year left me thoroughly demoralised) out of a combination of some real practical uses I have for it ("hard" doesn't to me in any way mean "bad"), and stubbornnes. But I'll do so without the 'help' of the community, which I find insufferable.