4 ms·
The complexity exposed by Rust is overwhelming for people that haven't done any low level programming. It's not just lifetimes, a basic Rust function can expos
by friedman23 4y ago
The complexity exposed by Rust is overwhelming for people that haven't done any low level programming.
It's not just lifetimes, a basic Rust function can expose the ideas of exclusive and non-exclusive ownership, traits, generics with and without trait bounds, algebraic data types, closures, closures that move, async, async blocks, smart pointers, macros, trait objects, etc etc.
There is absolutely a learning curve and it makes me understand why Golang is the way it is. The language authors of Golang saw the business needs of Google, realized that they need to get domain experts that are not programming savants to write code and created a language that would allow the largest number of non programmer domain experts be productive coders.
That being said, the Golang developers went too far and let too many of their biased ideas for what is "simple" infect the language. In what way is it simple for a language to not be null safe. I have a bunch of other complaints too.
But anyway, I don't think Rust is going to be a revolution in writing software unfortunately. I don't think enough people will be able to learn it for companies to be able to hire for Rust positions.
- shortcake27 4y agoRust keeps getting hyped so I thought I should give it a go. I’ve been writing JS/TS, Ruby, PHP, Python for 10+ years. It was a real struggle, and I wasn’t enjoying it at all. “Programming Savant” is a great way to put it because all the people I know who like Rust also happen to be the smartest engineers. In the end I gave up because I wasn’t getting any value. I was also trying to find a Rails equivalent, tried Actix and I didn’t like that either.
- shepherdjerred 4y agoRust is a good replacement for C/C++. It's not a good replacement for the languages you listed.
- satvikpendem 4y agoDisagree, I have a web server in Actix that I would have written in TypeScript and Node, or Python and Django, or Ruby and Rails, and the Rust version is similarly high level but far faster and more efficient. I recommend people read Zero To Rust In Production if they want to build a web API in Rust. https://zero2prod.com https://zero2prod.com
- renewiltord 4y agoI had the opposite experience. I wanted a quick http server that would proxy some requests where I couldn't control the client and the real servers. I hadn't written either language at the time, but I had it in seconds in Golang and fully functional and I used actix and halfway through the dependencies disappeared and then afterwards it was still a hassle even with help from people on the subreddit and discord. Reduced to its barebones, the problem is: 1. Expose a HTTP server 2. Make n HTTP requests 3. Combine their output 4. Return the result But I was definitely expecting to have an outcome in a few hours. This might be a language that it takes more than that time for me to be proficient enough to use async code in. Here's an example from my friend, almost exactly my problem and what was suggested: https://old.reddit.com/r/rust/comments/kvnq36/does_anyone_know_how_to_use_an_auxiliary_worker/ https://old.reddit.com/r/rust/comments/kvnq36/does_anyone_kn...
- satvikpendem 4y agoNot sure what you mean by dependencies disappearing. > This might be a language that it takes more than that time for me to be proficient enough to use async code in. Yes, it does take more time to learn the language, but once you do, it's pretty straightforward. Rust is a different way of thinking (a Meta Language dialect in C clothing, as I like to call it; it looks like C but it's definitely not the same semantically) while Go is similar enough to C-based languages and web based languages like Javascript that it's relatively easy to get started with. It's much the same as learning Haskell or APL, the entire paradigm will be different and can't be picked up in a few hours. However, if you already have functional or array programming experience, Haskell and APL will seem straightforward. It is because you have a lot of C-language or JS based experience that Go was easy for you.
- renewiltord 4y agoI'd just started on things and they randomly disappeared the repo. There was some Rust community kerfuffle that was going on. I don't know the details. It was really annoying at that time, but it's really not a big deal now. Yeah, it's probably just the programming paradigm that was different, but if you look at that post I posted there, it's not that straightforward (all the code is there so you can try it out). For what it's worth, I found burntsushi's code wicked easy. I don't write Rust but I have my own forks for `xsv` and `ripgrep` and I could just pop in and add a new command and some functionality. But that actix-web experience was intense. I spent like 4 hours on it and couldn't make it work and then the repo disappeared and I just used go.
- Gigachad 4y agoDisagree, I've used it to replace Ruby at work. I haven't had any criticisms of the language itself, only the library ecosystem and community knowledge make it difficult. I spent a lot of time working out what the right library is or working without examples for some libraries. In the end the finished product is as easy to work on as our Ruby code once the patterns are established and libraries imported.
- shepherdjerred 4y agoRust shines in two domains: high performance, and systems programming. Ruby is most commonly used for web applications (e.g. Ruby on Rails). Rust is much lower-level than Ruby, so in general you're going to be a lot more concerned about memory -- in this case, satisfying the borrow checker, dealing with stack vs heap allocation, etc. > the finished product is as easy to work on as our Ruby code I... highly doubt this. It's harder to hire Rust programmers than it is Ruby programmers. It's harder to teach Rust than it is Ruby. And, again, your Rust code is going to be much more in the weeds than Ruby would be. Rust also is a pretty complex language -- there are a lot of concepts to learn if you want to use it well. Ruby is fairly easy to learn. I'm not saying that Rust isn't the right language for you, or that Rust is bad (I love Rust!), I'm just saying that it's much lower level than Ruby, and that comes with tradeoffs.
- deleted 4y ago[deleted]
- Gigachad 4y agoThe latest service I built kept a list of urls to poll in a database and it polls/processes/sends off the result. Using a http and ORM library I found this task to be pretty much the same difficulty as doing it in Ruby only it was far more reliable than Ruby. Making HTTP requests and using an ORM in rust wasn't harder than in Ruby. I didn't have to think much about the borrow checker or memory as it was all single threaded simple stuff.
- kenhwang 4y agoRust is a decent replacement for any static compiled language too. It's honestly a breath of fresh air if you actually need to use parallelism and had to experience that with other static languages. Even my peers that transitioned from ruby to rust had a pretty smooth time since ruby's functional-ish, enumerable dependence, and blocks style coding lends itself well to rust's idioms. But if you've only ever stayed in iterative dynamic language land and don't remember university coursework on programming languages, compilers, or operating systems, yes, you'll probably be in for a world of pain and frustration.
- tayo42 4y ago> because all the people I know who like Rust also happen to be the smartest engineers. I wish people didnt say or think things like this. a lot of the times people get into these complex things and talk over people to make them selves look smart. or make things look more complicated then they really are to improve their image. i ran into this a lot when dealing with rust. if you can't do complex things in a clear and simple way, your just regular.
- shepherdjerred 4y agoGo and Rust solve different problems. Rust is a very complicated language, but it's a much safer language for systems programming. I don't think that there is a better language for systems programming. Go is probably the most widely used 'simple' language, and it's primarily used for applications. You can find some examples of using Go for systems-like programming, but that's not where it shines.