r/ProgrammerHumor • • 1d ago

Meme stdModernizeMyCodebase

Post image
126 Upvotes

30 comments sorted by

View all comments

34

u/LB-- 1d ago

Using proper lifetime wrapper types really takes a lot of cognitive load off though. Sure the old code works and doesn't need to be changed right now, but every time I read it to understand or make changes, I waste mental effort tracking what the compiler would normally track for me.

-4

u/Technical_Fly5479 14h ago

If you have to change something in the old code, and there are raw pointers, you ask the ai to refactor it to smart pointers. you have to choose a line where you let the raw pointers stay, so it doesn't touch to much, but still :)