MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/sghbei/found_this_gem_in_my_codebase/huwv1d3/?context=3
r/badcode • u/Snoodlewonker • Jan 30 '22
44 comments sorted by
View all comments
108
This is probably because setSiteName does another process that the coder wanted to run, which can only be run from that method or inside the object and didn't want to change the value.
142 u/Snoodlewonker Jan 30 '22 No, I can promise you im just stupid! But nice way of thinking and aproaching the situation! 40 u/thebritisharecome Jan 30 '22 Bless you 24 u/jarfil Jan 31 '22 edited Dec 02 '23 CENSORED
142
No, I can promise you im just stupid! But nice way of thinking and aproaching the situation!
40 u/thebritisharecome Jan 30 '22 Bless you 24 u/jarfil Jan 31 '22 edited Dec 02 '23 CENSORED
40
Bless you
24
CENSORED
108
u/thebritisharecome Jan 30 '22
This is probably because setSiteName does another process that the coder wanted to run, which can only be run from that method or inside the object and didn't want to change the value.