this post was submitted on 07 Apr 2025
25 points (100.0% liked)

Ask Lemmy

30724 readers
1917 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !askusa@discuss.online


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 2 years ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] bluGill@fedia.io 4 points 11 hours ago (1 children)

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.

[–] droning_in_my_ears@lemmy.world 1 points 11 hours ago (1 children)

You sound like a really thoughtful and humble developer honestly. I hope when I'm more experienced I'm like you.

[–] bluGill@fedia.io 1 points 9 hours ago

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.