[DiscordArchive] And how does directly manipulating member variables solve this problem?
[DiscordArchive] And how does directly manipulating member variables solve this problem?
Archived author: stoneharry • Posted: 2024-06-13T22:41:48.753000+00:00
Original source
And how does directly manipulating member variables solve this problem?
Archived author: Foe • Posted: 2024-06-13T22:42:39.875000+00:00
Original source
To be fair, using setters/getters set you up for future logic (if/when it's needed) without having to change all your direct member variable calls ♂️
Archived author: Foe • Posted: 2024-06-13T22:42:44.668000+00:00
Original source
Seems like a win/win for me
Archived author: chipzz • Posted: 2024-06-13T22:42:49.831000+00:00
Original source
The behaviour isn't described anywhere, and arguably it should trigger whatever is supposed to be triggered when the timer expires. It doesn't
Archived author: chipzz • Posted: 2024-06-13T22:43:41.963000+00:00
Original source
Fourth, you shouldn't be modifying the interval in the first place. I doubt theres a lot if any cases at all where this makes sense
Archived author: stoneharry • Posted: 2024-06-13T22:43:46.389000+00:00
Original source
It's a documentation issue, not a code problem. Direct variable manipulation does not help at all here, it only brings disadvantages.
Archived author: chipzz • Posted: 2024-06-13T22:43:58.631000+00:00
Original source
And for the few cases where it does make sense, you should probably delete your timer and make. a new one
Archived author: Foe • Posted: 2024-06-13T22:44:00.324000+00:00
Original source
That really depends on the internal variable though..
Archived author: stoneharry • Posted: 2024-06-13T22:44:09.282000+00:00
Original source
One does not need to solve use cases that are not likely to occur
Archived author: Foe • Posted: 2024-06-13T22:44:23.339000+00:00
Original source
If you shouldn't modify a variable, you shouldn't have an externally available setter