"Rust screams at you all day, every day, often about things that you would have considered perfectly normal in another life." 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…
Was Rust Worth It?
201–210 of 736 posts
Re: Was Rust Worth It?
#202Earlier 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.
That doesn't really work. All unsafe lets you do is dereference pointers or call unsafe functions. That's not gonna speed your development up during prototyping. You can instead wrap everything in Arc > and .clone() liberally, though.
Re: Was Rust Worth It?
#203Earlier quoted context omitted.
> "We're pretending security is not an issue." has been the feedback every time this is raised with the Cargo team. Do you have a specific link where I can read this response, because this is not at all the responses I have read.
Just some random Cargo security-related issues I noticed: - No strong link between the repo and the published code. - Many crates were spammed that were just a wrapper around a popular C/C++ library. There's no indication of this, so... "surprise!"... your compiled app is now more unsafe C/C++ code than Rust. - Extensive name squatting, to the point that virtual no library uses the obvious name, because someone else…
Re: Was Rust Worth It?
#204Earlier quoted context omitted.
To close the loop, Rust doesn't include a `null` type and you wouldn't encounter something comparable in idiomatic Rust (because you'd be using eg Option::map to handle None cases gracefully), so this is a class of test that would be common in Java and C that is close to irrelevant in Rust.
To be more specific, Rust does have among other things: std::ptr::null() - an actual null pointer, probably the zero address on your hardware, and this isn't even an unsafe function. On the other hand, you won't find many uses for a null pointer so, I mean, congrats on obtaining one and good luck with that. std::ptr::null_mut() - a mutable null pointer, similarly unlikely to be of any use to you in safe Rust, but als…
Re: Was Rust Worth It?
#205As an outsider, I often hear about async Rust being less than ideal. Perhaps I don't understand, because I haven't dipped my toes in the water yet... but I do most of my work in Kotlin with Coroutines, and concurrency is everywhere in the UI. I can't imagine working in a language having a major deficit in this space. Are there any efforts to overhaul or completely rethink this?
Re: Was Rust Worth It?
#206I never programmed in Rust, but I had enough experience in C programming to know that segmentation faults are annoying to debug. I heard Rust prevents memory management problems at compilation level, so it forces you to create safer program. Given this, I want to ask Rust programmers here: For people who have no experience in managing memory at coding stage (basically programmer who have no experience in C-like langu…
Re: Was Rust Worth It?
#207I'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?
#208Earlier quoted context omitted.
As one of the main people working on Rust compiler diagnostics, I find this comparison beyond distasteful. The tooling is not capricious in its restrictions and we go out of our way to make it communicate to people with as much empathy and support as possible.
There's a clear distinction between someone who writes the code and everyone else in the world who works with the outputs of your code. Doesn't feel that way to me.
Re: Was Rust Worth It?
#209"Want to use an async library? There’s a chance you can’t use it outside of a specific async runtime." I complained about this here[1]. I'm told "Tokio won, it's not a problem anymore." Wrong. It's still a problem and it's a killer. [1] https://news.ycombinator.com/item?id=37892655
Can you help understand why somebody wouldn't use Tokio/why it didn't "win"?
And so, for some or all of these reasons, right or wrong, various Rust libraries wed themselves to runtimes other than Tokio.
You can thunk around these things, but it's miserable, yielding subtle, inscrutable code that you will not understand in six months when you have to maintain it. And the real fun begins when you need to handle Err, and all the abstraction leaks around Send and threads ruin your day; more thunking, Boxing errors (omfg) and even subtler and more inscrutable code.
Re: Was Rust Worth It?
#210> After two decades of JavaScript and decent experience with Go, this is the most significant source of frustration and friction with Rust. It’s not an insurmountable problem, but you must always be ready to deal with the async monster when it rears its head. In other languages, async is almost invisible. I am a former C and C++ programmer who lived calling into pthread almost every week for a decade. I use async rus…
Does "use async rust everywhere now" imply "use tokio everywhere now?" Honest question.