this post was submitted on 02 Jun 2023
23 points (100.0% liked)
Programming
13376 readers
1 users here now
All things programming and coding related. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Python and C# for the most part. I'm also putting serious effort towards learning Rust, but I likely won't be able to use it at work. It's a good learning experience, and I can tell that my code after learning basic Rust in C# and Python is better than before.
What's better with your code? What did using Rust reach you?
The "correctness" of my code would probably the greatest single difference I've noticed in my own habits.
For example, I've become very strict with myself about using type hints and relying on appeasing type checkers and such. The way I structure my projects has changed, where I separate functionality from data to a larger degree, mimicking
struct
andimpl
where it makes sense to do so. I've pretty much stopped usingdict
, and rely on dataclasses instead when writing Python. I've given up on forcing everything to be OOP (even C#), which has made my code easier to read and maintain. There are probably other things as well, though I can't list them at the top of my head.Some of it is probably just good practice, a result of having matured after being exposed to new languages. Some of it probably wouldn't be considered pythonic or idiomatic, but I'm not sure I care anymore. My code is more reliable (and often faster), and that's what matter in the end.