←back to thread

177 points signa11 | 1 comments | | HN request time: 0.298s | source
Show context
Aurornis ◴[] No.42161106[source]
A theme I’m noticing more frequently as Rust gains popularity is people trying to use Rust even though it doesn’t fit their preferred way of coding.

There is a learning curve for everyone when they pick up a new language: You have to learn how to structure your code in ways that work with the language, not in the ways you learned from previous languages. Some transitions are easier than others.

There should come a point where the new language clicks and you don’t feel like you’re always running into unexpected issues (like the author of this article is). I might have empathized more with this article in my first months with Rust, but it didn’t resonate much with me now. If you’re still relying on writing code and waiting for the borrow checker to identify problems every time, you’re not yet at the point where everything clicks.

The tougher conversation is that for some people, some languages may never fully agree with their preferred style of writing code. Rust is especially unforgiving for people who have a style that relies on writing something and seeing if it complies, rather than integrating a mental model of the language so you can work with it instead of against it.

In this case, if someone reaches a point where they’re so frustrated that they have to remember the basic rules of the language, why even force yourself to use that language? There are numerous other languages that have lower mental overhead, garbage collection, relaxed type rules, and so on in ways that match different personalities better. Forcing yourself to use a language you hate isn’t a good way to be productive.

replies(4): >>42161149 #>>42161234 #>>42162570 #>>42164055 #
blub ◴[] No.42162570[source]
What did the Rust community expect to happen if they so strongly and often claimed that Rust is easy to learn and user-friendly?

And how did we get from that to “for some people, some languages may never fully agree with their preferred style of writing code”?

If a C++ programmer (ideal Rust learner) says four years in that the ergonomics of Rust are bad, then based on my own experience I will believe them.

I don’t write something to see if it compiles either, I design every single line of code. But with Rust (and a lesser extent C++) a lot of that design is for memory safety and not necessary for the algorithms.

replies(3): >>42162676 #>>42163188 #>>42163655 #
Ygg2 ◴[] No.42163188[source]
> What did the Rust community expect to happen if they so strongly and often claimed that Rust is easy to learn and user-friendly?

No one really claimed it was easy to learn. Find me one Rustacean that claims Rust is as easy as Python/Ruby/Go.

But it is higher level language with decent ergonomic and in such way it can be interpreted as user-friendly.

> If a C++ programmer (ideal Rust learner)

If Java programmer (me) can learn Rust in a year enough to contribute to Servo development, you (ideal Rust learner) should have no problem either.

Plus Google saw about 6-month to get people up to speed with Rust.

replies(1): >>42164183 #
chipdart ◴[] No.42164183[source]
> No one really claimed it was easy to learn.

It's a great example of unintended comedy the fact that the comment right below yours is literally "Rust is easy to learn and user friendly."

https://news.ycombinator.com/item?id=42162676

replies(1): >>42165805 #
1. Ygg2 ◴[] No.42165805[source]
Sure but that's a no one. Same as me. Find someone on Rust team saying that. Or someone teaching Rust constantly.

I can see user friendly. It's got a solid ecosystem around it, and compiler is super helpful with errors.

But easy to learn it ain't.