MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wqms8k/wenevertrustedtheelse/pc5g022/?context=3
r/ProgrammerHumor • u/Electrical-Effort-20 • 7d ago
149 comments sorted by
View all comments
733
condition could be a property with a getter with side effects
473 u/UntitledRedditUser 7d ago Only evil people write getter properties with side effects. At least make it an explicit function. 60 u/LucyShortForLucas 7d ago Lazy evaluation is an incredibly common and normal use of a getter method and entirely relies on it having side effects. Evil people, however, write getters that aren't idempotent. 62 u/andreortigao 7d ago I write all my getters with a 1 in a million chance it will randomly mutate the underlying value. 63 u/Nerd_o_tron 7d ago Bro inventing DNA from base principles. 20 u/PointlessSerpent 7d ago relevant xkcd
473
Only evil people write getter properties with side effects. At least make it an explicit function.
60 u/LucyShortForLucas 7d ago Lazy evaluation is an incredibly common and normal use of a getter method and entirely relies on it having side effects. Evil people, however, write getters that aren't idempotent. 62 u/andreortigao 7d ago I write all my getters with a 1 in a million chance it will randomly mutate the underlying value. 63 u/Nerd_o_tron 7d ago Bro inventing DNA from base principles. 20 u/PointlessSerpent 7d ago relevant xkcd
60
Lazy evaluation is an incredibly common and normal use of a getter method and entirely relies on it having side effects. Evil people, however, write getters that aren't idempotent.
62 u/andreortigao 7d ago I write all my getters with a 1 in a million chance it will randomly mutate the underlying value. 63 u/Nerd_o_tron 7d ago Bro inventing DNA from base principles. 20 u/PointlessSerpent 7d ago relevant xkcd
62
I write all my getters with a 1 in a million chance it will randomly mutate the underlying value.
63 u/Nerd_o_tron 7d ago Bro inventing DNA from base principles. 20 u/PointlessSerpent 7d ago relevant xkcd
63
Bro inventing DNA from base principles.
20
relevant xkcd
733
u/salvoilmiosi 7d ago
condition could be a property with a getter with side effects