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
-
I could have just made that object global, but making it an implicit forces every method which depends on a hack to pay a small cost in the form of a definition-site parameter: extra motivation to [re]implement hack-free solutions.
1 reply 1 retweet 5 likesShow this thread -
Replying to @propensive
I have used
@deprecated in the past for this purposes. And now someone on Twitter named deprecated is wondering why I'm talking about them.1 reply 0 retweets 1 like
Replying to @sheldonyoung @deprecated
Actually, using @deprecated from the beginning would work pretty well. :)
1:13 PM - 9 Jun 2020
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.