this post was submitted on 20 Jan 2024
46 points (97.9% liked)
Programming
17270 readers
39 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Our most recent project at $DAYJOB has been in Rust. New programming language always presents an opportunity for learning, obviously, but what Rust does in particular, is that it asks you to be very explicit.
Which isn't to say, it demands it, as you can just slap the same semi-correct boilerplate onto most things. For example, for the longest time, I told it to make data types both serializable and deserializable, as soon as they needed to be either of those.
But well, it gives you an opportunity to think about it. At some point, I realized that I was only using a data type for deserializing data from a REST API. I never serialized that type. And that was crucial information, I was missing when looking at that code snippet. So, rather than writing some comment which future-me won't read either, I could just nix the serialization path.
And since then, I'm being very intentional with whether I'm making types serializable, deserializable or both. It feels like I've graduated from just slapping on boilerplate to actually knowing what I'm doing.
What I didn't tell you is that I've actually been programming in Rust for 5 years. Certainly feels like it's about time, I started knowing what I'm doing. At the same time, I can also tell you for free that there's still loads of topics where I don't yet actually know what I'm doing. And these lessons are rarely actually Rust-specific...