Sometimes to make things work, I need to apply temporary hacks, like hardcoding a few values. I just decided that I'm going to put them all into a `Hacks` class, which I will demand as an implicit to any method which needs them. Now they're more visible and less forgettable.
-
Show this thread
-
Replying to @propensive
tbh I'd use an object anyway. Passing it implicitly requires infecting the entire call stack with it, and later you'll likely be removing all of that but only making actual changes at the use site (and probably a constructor param). YMMV
1 reply 0 retweets 3 likes
Replying to @kubukoz
Yes, maybe. My intention was to document (with static code) which methods are relying on "hacks", directly or indirectly, but the cost of the "indirectly" ones may be too high.
11:13 PM - 9 Jun 2020
from Krakow, Poland
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.