> It also looks like (soon) you’ll finally be able to configure global lints for a project. Until now, you had to hack your solution to keep lints consistent for projects. > I questioned my sanity every time I circled back around to the Clippy issue above. Surely, I was wrong. There must be a configuration I missed. I couldn’t believe it. I still can’t. Surely there must be a way to configure lints globally. I quadru…
Was Rust Worth It?
251–260 of 736 posts
Re: Was Rust Worth It?
#252A key factor in selecting language is ChatGPT. I need to use ChatGPT as a programming sidekick/pair programmer/mentor. Yes, I am not afraid to admit - I need an AI assistant and won't program without it - AI is far too valuable. If ChatGPT struggles with a programming language that is a big problem. I have had a great experience with ChatGPT with TypeScript, SQL, Python, golang, C++. I tried ChatGPT with Rust and it…
I tried for a long time for chatgpt to help me write a simple function that generated a random array and then summed along the columns. Could not do it. Pasting in an error message, made chatgpt spit out another version of the code with some other error.
Run it. If there is an error, either debug it or ask ChatGPT to take a different approach.
There's something wrong if you can't get it to do this.
Re: Was Rust Worth It?
#253Programming in Rust is really not like being in an abusive relationship. The compiler is trying to help out as much as possible, especially since rustc has the best error messages in the world.
> The compiler is trying to help out as much as possible, especially since rustc has the best error messages in the world. Generally good, but man do I hate how any error in my async function causes every recursive call site to generate an error about how the Future is no longer Send and Sync. Literally an entire console scrollback of errors with the actual syntax error buried somewhere in the middle.
Re: Was Rust Worth It?
#254I'm learning Rust because it seems clear that it's going to be important professionally. I wish I loved it, I really do. I see the benefits. But, at least so far, it's one of the most unpleasant languages I've used. I keep hoping that as I gain proficiency, I'll stop disliking it, but as I climb higher on the learning curve, I'm not really warming to it. It's fine. It won't be the only language I'll be proficient in…
Re: Was Rust Worth It?
#255Re: Was Rust Worth It?
#256Earlier quoted context omitted.
> A good C compiler does this when you turn on all the flags. I like languages/compilers that let you selectively disable the screaming and let you write bad code on purpose. Bad code that works but can be written fast is often better than perfect code that takes forever to write. Once you have a bad but working POC, you can make it less bad. Rust supports that. Just mark everything unsafe.
"Just mark everything unsafe" seems to be the motto of many (most?) crate developers. There's so much "unsafe" in dependencies used by so many Rust programs. It's a timebomb waiting to go off.
Re: Was Rust Worth It?
#257Earlier quoted context omitted.
Agreed. The other thing I don’t really like is that you can’t split up things in the rust namespace hierarchy between crates (something that’s natural with jars in JVM). I would have liked to have defined things so that I could have the unicode handlers for finl live in finl::unicode, the parser in finl::parser, etc. but because they’re in separate crates rust gets upset about finl being defined twice and there’s no…
Would re-exporting partially solve your problem?
Re: Was Rust Worth It?
#258I'm learning Rust because it seems clear that it's going to be important professionally. I wish I loved it, I really do. I see the benefits. But, at least so far, it's one of the most unpleasant languages I've used. I keep hoping that as I gain proficiency, I'll stop disliking it, but as I climb higher on the learning curve, I'm not really warming to it. It's fine. It won't be the only language I'll be proficient in…
For me, the key to understanding the borrow checker was understanding the underlying memory model. Rust memory model is the same as that of C, with some extensions for abstractions like generics. The borrow checker rules seem arbitrary at first. But it's deeply correlated to this memory model. The real value of the borrow checker is when I trigger it unintentionally. Those are bugs that I made due to lapse in attention. What scares me is that another language like C or C++ might simply accept it and proceed.
Yet another pleasant side effect of Rust's strict type system and borrow checker is that they gently nudge you to properly structure your code. I can say for certain that Rust has improved my code design in all the languages that I use.
Re: Was Rust Worth It?
#259I feel like Rust finally broke the idea that programmers should be in complete control and completely conscious of everything the compiler is doing. It hasn't been that way in decades, compilers are freaking magic. But Rust undid a lot of that with borrowing. People became comfortable with the compiler knowing better than them. I just wish we could relax further: We should never be explicitly iterating forward over a…
> Give me rusty bash. Bash with types (especially floats), fewer edge cases, functions with explicit parameters, simple command line flags...
Re: Was Rust Worth It?
#260Earlier quoted context omitted.
Yes, and all of those have had major security issues caused by their lack of foresight. "We're pretending security is not an issue." has been the feedback every time this is raised with the Cargo team. To be honest, it's turned me off Rust a little bit. The attitude of "Rust is memory-safe, so we don't need any other form of security." is not a good one.
> "We're pretending security is not an issue." has been the feedback every time this is raised with the Cargo team. Literally nobody has said this. > The attitude of "Rust is memory-safe, so we don't need any other form of security." is not a good one. Fortunately it's an attitude that nobody in the Rust project has!
I know of a few people, personally, who have said this.