News for hackers. Stuff that matters.
Re:Zero to Production in Rust by tayo42 on Saturday June 05, 2021 @01:55PM (#27407180)
Rust is really hard to learn though. the compiler errors are hard to read and understand, it's an extremely syntax heavy language. I used to work with someone who regularly contributed to rust, I had some errors on a project that confused him too. The only other times I needed to a book to learn a language was Scala and haskell, both hard to learn languages.
Re:Zero to Production in Rust by tracer4201 on Saturday June 05, 2021 @05:02PM (#27408434)
Picking up Rust is not the same as picking up Python or even Java, in my opinion.

I started learning Rust and C++ at the same time, coming from a world of Java, Python, and Ruby.

If I need to solve a problem in C++, I would much rather write Rust because the compiler actively screams at you when you do bad things.

And in my opinion, the challenging part is learning what those bad things are. In other languages, the compiler doesn’t care. You immediately see your program crash or things fail in subtle, hard to reproduce ways later in production. Rust changes that model.

I disagree with you on the documentation. I think the Rust documentation is superb. I have yet to see any language give nearly as meaningful information when your code fails to compile. Secondly, Rust front loads and throws issues immediately in your face, as opposed to having you discover problems in your code at runtime. I don’t think that makes Rust difficult - it’s forcing you to think about your choices. And particularly it’s making you think about concepts that perhaps you completely overlooked in other languages - thinking about stack vs heap allocation, moving semantics, shared ownership, etc.

If you want to quickly prototype something, Rust isn’t the best language IMO. But if I have a choice between C++ and Rust, I’d go with Rust anyday. If I was starting a new project from scratch and it was more of a web service, I might go with another language over Rust only because I’m more of an expert in Java, Python, etc. and it’s easier to hire developers for those languages than Rust.

But I’m biased. Rust has a special place in my heart. It’s the first language I’ve learned in many years where I felt some sense of accomplishment and did not at all feel like “Oh great, another tool that fundamentally doesn’t add value.”

For my use cases involving Java and iOS interoperability in a multi threaded environment, nothing else came even close.

Re:Zero to Production in Rust by tayo42 on Saturday June 05, 2021 @06:12PM (#27408830)
I think your kind of discussing the positives of rust, but despite all that still rust is a lot of work to learn. The learning curve of rust might be worth it, I just didn't agree with the statement that rust isn't actually hard to learn.
Re:Zero to Production in Rust by steveklabnik on Saturday June 05, 2021 @02:01PM (#27407230)
Please file bugs for hard to understand error messages! We treat them as such. We’d rather have too many reports than not enough.