I wrote a lot of rust, but after some years it still feels unproductive. I do a lot of zig now and I am like 10 times more productive with it. I can just concentrate on what I want to code and I never have to wonder what tool or what library to use. I know rust gives memory safety and how important that is, but the ergonomic is really bad. Every time I write some rust I feel limited. I always have to search libraries…
How much of your negative Rust experience is due to async? Having used Rust for a long time it’s definitely the biggest source of confusion and headaches.
Was Rust Worth It?
501–510 of 736 posts
Re: Was Rust Worth It?
#502Earlier quoted context omitted.
> it can be very hard to actually know what method you can call on a struct The rust-analyzer language server can autocomplete the available methods for a value.
depending on the autocompleter feels like asking to code to Chatgpt to me.
Re: Was Rust Worth It?
#503Earlier quoted context omitted.
I'm not trying to shame you, but how long have you been coding? I've not yet had the urge to ask an AI for coding help, ever. The questions that are decoupled enough from a field/project that it might be able to answer seem trivial and easy just to search on. Plus, I'm way more trusting of a Stack Overflow post or even a blog post than what AI generates. I mean, AI hallucinates all the time or generates things that a…
I'm not trying to shame you, but how long have you been coding? You're not using the tools available to make you a better and more productive programmer? If you're not using AI as part of your daily workflow you are burning time and money and not maximising your potential. If I was your team lead I'd give you a warning, same as I would if you didn't use an IDE or source control. Being ignorant of programming producti…
I really think you mix up
a) common rules as they are needed to work together and (like style or source control) b) local tooling / someone is organizing his own workspace
including an dictator-like "MY way of working is the best!" attitude after disovering whatever works out for YOU. If I was your team lead, I guess I would give you a warning. :-D
Additionally, I guess your programming problems are very generic.
Re: Was Rust Worth It?
#504Earlier quoted context omitted.
> but the ergonomic is really bad. Every time I write some rust I feel limited. > But I do not think it is a good general purpose language. Remember that this is not a sentiment that's shared by everyone. I use Rust for tasks that need anything more complicated than a shell script. Even my window manager is controlled from a Rust program. I say this as someone who has been programming in Python for nearly two decades…
> At this point, I'm about as fast in Rust as I am in Python. This is factually impossible. For anything larger than (very) small programs, Rust requires an upfront design stage, due to ownership, that it's not required when developing in GC'ed languages. This is not even considering more local complexities, like data structures with cyclical references.
Factually it's not. It may be true that in a very very idealized thought-experiment, when someone has a perfect knowledge, never makes mistakes, doesn't have preferences, can type arbitrary fast etc, python needs fewer keystrokes, fewer keywords or such, thus is faster. Who knows. But in reality none of the assumptions above hold, also literally everything plays a much bigger role in development speed anyway.
Re: Was Rust Worth It?
#505Earlier quoted context omitted.
> At this point, I'm about as fast in Rust as I am in Python. This is factually impossible. For anything larger than (very) small programs, Rust requires an upfront design stage, due to ownership, that it's not required when developing in GC'ed languages. This is not even considering more local complexities, like data structures with cyclical references.
> For anything larger than (very) small programs, Rust requires an upfront design stage, due to ownership, that it's not required when developing in GC'ed languages. Every language requires this (if you want robust code), most just let you skip it upfront ... but you pay dearly for doing so later.
Re: Was Rust Worth It?
#506Earlier quoted context omitted.
> Later comes along Go. No dependency management at the start. There ended up being two ways of specifying dependencies. At least one included putting github.io/username/package into your code. That username changes and all your code has to change. Awful design. "github.io/username/package" is using a domain name, just like Java. Changing the username part is like changing the domain name--I don't see how this is any…
> I don't know why so many programmer's use a domain they don't control as the official home of their projects Not only that, but a commercial, for-profit domain that actively reads all the code stored on it to train an AI. Owned and run by one of the worst opponents of the OS community in the history of computing. At least move to Gitlab if you must store your project on someone else's domain.
Re: Was Rust Worth It?
#507Earlier quoted context omitted.
A null pointer exception is a bug that breaks business logic. There's no "business logic instead of language stuff" because the language stuff is the foundation that business logic rests on. If you don't test against failure modes, what's even the point in testing?
A null pointer exception is a free runtime check. I really don't understand the fuss about null. The "most expansive design mistake in computer science" and whatever.
Re: Was Rust Worth It?
#508Earlier quoted context omitted.
> but the ergonomic is really bad. Every time I write some rust I feel limited. > But I do not think it is a good general purpose language. Remember that this is not a sentiment that's shared by everyone. I use Rust for tasks that need anything more complicated than a shell script. Even my window manager is controlled from a Rust program. I say this as someone who has been programming in Python for nearly two decades…
> At this point, I'm about as fast in Rust as I am in Python. This is factually impossible. For anything larger than (very) small programs, Rust requires an upfront design stage, due to ownership, that it's not required when developing in GC'ed languages. This is not even considering more local complexities, like data structures with cyclical references.
Re: Was Rust Worth It?
#509I wrote a lot of rust, but after some years it still feels unproductive. I do a lot of zig now and I am like 10 times more productive with it. I can just concentrate on what I want to code and I never have to wonder what tool or what library to use. I know rust gives memory safety and how important that is, but the ergonomic is really bad. Every time I write some rust I feel limited. I always have to search libraries…
I agree with this general feeling, and it is hard to articulate Rust forces you to figure out ahead of time where each bit or byte is going to go and on which thread and using which mutation scheme. I’m happy to play the game, but it feels tedious for anything short of a parser or a microcontroller. It messes with my process because I like to get something working before I determine the best API structure for it I ca…
You can just clone and be on your merry way; you don’t need to worry about perf-related things if you don’t want to.
Re: Was Rust Worth It?
#510Earlier quoted context omitted.
> Cyclic references can be dealt with runtime safety checks too - like Rc and Weak. Indeed. Starting out with code sprinkled with Rc, Weak, RefCell, etc is perfectly fine and performance will probably not be worse than in any other safe languages. And if you do this, Rust is pretty close to those languages in ease of use for what are otherwise complex topics in Rust. A good reference for different approaches is Learn…
Except in those other languages the compiler types .clone() for me.