One of the comments on that video sums it up best for me:
I like Rust for the same reason why I like math. There are no blurry maybes, only strict yes or no. It feels good to not need to track needless complexity everywhere, only having to consider a task at hand, trusting compiler to do its job.
Yes! Exactly how I feel. After I finish writing some code I feel I know exactly how it will work and how it will behave when being executed. For some reason I have total confidence in that code. When I write JS/PY I either spend a lot of time doing super defensive coding trying to cover as much as I can think of or i still worry that sometimes things might not work as expected.
And importantly: Even if your Rust code doesn't behave as you expect, the changes needed to make it do so are often minimal. For example, I've occasionally written > when I meant <. Or sometimes, I've assumed a number would come out one way, but I need to add another function call to make it actually come out that way.
I feel this as well! In python, people at my job wrote a library with some fallible functions.
Instead of returning T | None = Optional[T], it returns (bool, T), where bool is an indicator of whether it was ok, but it won't catch all errors, and T might return as empty, like in pd.DataFrame() with no data.
Having an Optional[T] would be so much simpler, clearer and easier to handle!
Writing Rust reminds me of that one older TheOnion video about the autistic reporter interviewing a prisoner, getting increasingly ecstatic as he is told about the rigid structure and schedules of prison life.
Yes, Rust is the prison in this analogy, but it's one we all like and understand. Contributing to libraries and comprehending foreign codebases is (imo) way easier in Rust as opposed to C++ where many larger projects bend the language to its will. This can be desirable for some, but i don't fucking think so >:(
Contributing to libraries and comprehending foreign codebases is (imo) way easier in Rust as opposed to C++ where many larger projects bend the language to its will.
Sadly true. About the only C++ codebase I feel confident comprehending, is Godot Engine. Seriously, go look at the code for your favorite node - there's a good chance that if you remade that node in GDScript, the code would look nearly identical (bar the syntax differences).
I'll acknowledge the analogy is a strange one, but it's mostly in reference to its conventions and that there is a stricter sense of what's "idiomatic" and that we kindof like it that way.
._. I can relate since I’m a mathematics major but I study a lot of computer science as well as currently I’m doing symmetric key management research and Rust has been one of my favorite languages but I’ll state that I’m somewhat biased since much the computer I’m reading and analyzing is rust code.
For those of you who read geometry, topology and physics by Nakahara, it is very similar to reading application of abstract math (e.g. topology, abstract algebra) to physics, it can be very complex at times, but I enjoying reading and understanding it. It is describe complex topics in a way that is simple enough, but not too simple.
View all comments
357
u/MichiRecRoom Sep 24 '24 edited Sep 24 '24
One of the comments on that video sums it up best for me: