Live data from Hacker News

Rust can be difficult to learn and frustrating, but it's also very exciting

influxdata.com

61–70 of 282 posts

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#62

I have been learning Rust on and off this year. I have been writing mostly GO for the past few years, but am moving to coding almost primarily in Rust for any new project, and porting over some older ones. Microservices, Data Layer, etc... Honestly, while not perfect, its one of the most beautiful languages I have ever come across. Plus, I have not enjoyed coding in a language this much in a while.

How does your team (E.g., the people on the hook for reviewing/supporting/contributing to your project) feel about the change? This is a big difference when moving from Go. A language that nobody calls beautiful, but is very easy for a team to contribute to and support (relative to other languages).

I don't think that's fair. I'm not entirely sure what beautiful means for a programming language, but I've seen many examples of Go programs which exhibited a beautiful simplicity. This project for example: https://github.com/inconshreveable/slt.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#63

Rust is the answer to the question "can we have speed, correctness, and expressiveness in one language?" My company has been running Rust in production for awhile now, and it's exceeded every expectation. It's fast, it's safe, and it's so productive it's hard to find a reason to use anything else. We've also found that the learning curve is, in our opinion, a bit overstated. We've ramped up several new grads on Rust…

I had a play with rust at the start of the year while I was evaluating if it would be good for the api backend for my new website. I was using rocket as a framework. The language itself seemed quite ready for use and the book was very helpful but I found all the libraries I needed were half finished and didn't have the features I needed or if they did they had docs that assume you will read the source code and work most of it out yourself. I spent ages trying to work out how to set up postgres with it and got stuck on stuff about connection pools and multithreading.

I ended up just using rails in api mode which is a shame because it chews up the limited memory on my server.

Most of these issues would go away if I was a rust pro and I could just write my own libraries and read the source but it really didn't feel like rust was helping me become productive fast like ruby did.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#64
post #34

I'm optimistic for the future of Rust. I currently program in Go for server side web stuff, but with the proposed changes to the Go language, the decision to choose Go over Rust becomes less compelling; Rust already has generics, a competent module system, better error handling, and ADTs. Go had a very narrow scope and very clear oversights, which are now bigger issues they are trying to shoehorn solutions into with…

It's web ready. It's very web ready.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#65
post #62

Earlier quoted context omitted.

How does your team (E.g., the people on the hook for reviewing/supporting/contributing to your project) feel about the change? This is a big difference when moving from Go. A language that nobody calls beautiful, but is very easy for a team to contribute to and support (relative to other languages).

I don't think that's fair. I'm not entirely sure what beautiful means for a programming language, but I've seen many examples of Go programs which exhibited a beautiful simplicity. This project for example: https://github.com/inconshreveable/slt .

I didn’t mean to knock Go. It’s just that when I ask people what they love about it, nobody usually expresses a “feeling” they have when they use it.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#66
post #4

Can anyone recommend exercises for learning a new language. For example, something like "implement a class with these methods", or implement a function that does this. Something that is realistic, should only take an hour or two to implement for a competent programmer, requires you to learn more complicated features of a language, yet I can finish before getting bored or frustrated?

Peter Norvig has a repo of such problems / solutions (he solves them in Python, and calls them "pytudes" = "python" + "etudes", although they should be solvable in any language) https://github.com/norvig/pytudes

Rosetta code also has a great selection of problems / solutions in various languages: http://rosettacode.org/wiki/Category:Programming_Tasks

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#67
I love Rust, but in all honesty I wouldn't use it vs. Golang or C++17 for something that isn't a critical system (e.g a cryptography lib) and even then I'm not sure I wouldn't use something like OCaml instead.

The curve to productivity seem way too steep for the payoff.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#68

Rust is the answer to the question "can we have speed, correctness, and expressiveness in one language?" My company has been running Rust in production for awhile now, and it's exceeded every expectation. It's fast, it's safe, and it's so productive it's hard to find a reason to use anything else. We've also found that the learning curve is, in our opinion, a bit overstated. We've ramped up several new grads on Rust…

I had a play with rust at the start of the year while I was evaluating if it would be good for the api backend for my new website. I was using rocket as a framework. The language itself seemed quite ready for use and the book was very helpful but I found all the libraries I needed were half finished and didn't have the features I needed or if they did they had docs that assume you will read the source code and work m…

Seems like Elixir + Phoenix would be a better alternative over rails for you

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#69
post #67

I love Rust, but in all honesty I wouldn't use it vs. Golang or C++17 for something that isn't a critical system (e.g a cryptography lib) and even then I'm not sure I wouldn't use something like OCaml instead. The curve to productivity seem way too steep for the payoff.

Woah, woah, woah. First, Go and C++ are vastly different languages. Apples and oranges.

C++ is huge. It takes an incredible amount of effort to become a proficient C++ developer, and even then, C++ offers none of the amazing safety guarantees that Rust's borrow checker enforces. It's old language with sedimentary layers, including C backwards compatibility. Rust is no where near as complex, and Rust does 5x more to ensure you use Rust correctly. It has brought so many crucial advancements as well: immutable by default, typeclasses instead of OOP (thank god), real sum types, better unicode support, better concurrency primitives, and much much much better tooling and package management. No one in their right mind would be cracking out another C++ project if they took the time to learn Rust and C++.

Go isn't really in the same league as Rust, C++, or C. It's syntax is deceptively C like, and it has an equally poor type system, but it's performance is closer to Java, which is a few orders of magnitude slower than C++. Despite pushing outdated concepts like null and raw pointers on to the programmer, it has a runtime with a stop the world GC with no guarantees about object placement on the stack or heap. Go is also incredibly divisive, it's a step backwards that hardcodes a few useful container types, and gives you no facility to create your own. It has a hard coded method of concurrency (goroutines). While useful in it's simplicity, it lacks the generality one would expect of an industrial language, and these concerns are only now being accepted by the Go team in their 2.0 drafts. Many people believe that Go rose to popularity because of the authors and the company sponsoring it, not on its technical merits ,and Brad Fitzpatrick, one of the maintainers, even said the language brought nothing new to the table aside from better concurrency support in the Gotime podcast episode he attended.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#70

Earlier quoted context omitted.

I had a play with rust at the start of the year while I was evaluating if it would be good for the api backend for my new website. I was using rocket as a framework. The language itself seemed quite ready for use and the book was very helpful but I found all the libraries I needed were half finished and didn't have the features I needed or if they did they had docs that assume you will read the source code and work m…

Seems like Elixir + Phoenix would be a better alternative over rails for you

Maybe. I also tried Haskell and Yesod but had the same issues. It seems the size of the userbase for a language/framework massively impacts how fast I can do things. With haskell I was posting multiple questions on stack overflow every day but with ruby I find almost everything I need already answered.
Post reply on HN