Feel like everyone’s been telling me it’s the best thing since sliced bread. I’m just a hobbyist with like a single big project I’m maintaining but I’m starting to hate the code and idk maybe I should rewrite it in rust. Idk
Feel like everyone’s been telling me it’s the best thing since sliced bread. I’m just a hobbyist with like a single big project I’m maintaining but I’m starting to hate the code and idk maybe I should rewrite it in rust. Idk
Hating the code is normal. After a while you start to realize all the hard to change decisions you made long ago. What you don’t know is if those decisions you wish you had made would be better. There have been a lot of fads over the decades, some of them are complete junk, but the majority have some good points. However all of them have some negatives as well, and there is no obvious answer to which negative is right to accept for your projects.
The ideal answer is spend 20 years learning lots of different options, then find a time machine and go back in time to and restart the project based on what you have learned. Of course at the end of that 20 years you will hear about some new thing you didn’t try, but you have to draw the line somewhere. (finding a time machine is left as an exercise for the reader)
Rust is an interesting language with some nice memory safety guarantees. As a C++ developer it speaks to some of the problems I have - but most of my problems with C++ are with 15 year old code from before I was able to use C++11. ( had to put a lot of effort into getting this good with c++ though, Rust is likely a lot easier to learn to my level). The Ada/Spark advocates have long been saying things that really speak to me as well - formally proven code sounds great, though there are others who tell me it isn’t as good as the advocates claim. Go has some advocates saying interesting things as well, though they don’t speak to the issues I personally have as much it might be better for you.
If you are writing all new code then I would put Rust high on the list. However most programs are adding to something that exists and the friction of writing Rust to existing code is often high enough that I’d stick with what the other code is written in.
You sound like a really thoughtful and humble developer honestly. I hope when I’m more experienced I’m like you.
A part of it is when you get old you realize the “kids” are doing the exact same thing you did 20 years ago, but they gave it a different name and changed some tiny details so they can pretend it is different. The real question is how do you get kids to see this - most don’t (including me when I was a kid - and I was aware of the issue and tried to guard against it)
The more important part at my age is to remember that kids today are just like me. Sure the exact style and what is in/out has changed, but kids are the same as we were. I didn’t even have the option of a smart phone, but I had my own addictions, and the older generation complained about them… Sometimes the old people have a point, but often kids these days are just like kids in the past.