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.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Great idea. Would it be worth splitting, in advance, into different categories e.g. mini hacks vs big hacks..? ;)
-
Hack prioritization can be a next step.
End of conversation
New conversation -
-
-
unsafe_ all the things
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This reminded me of your `Internet` object for things that require internet connection. It's the same approach.

-
Yes, I reminded myself of that just after I tweeted it!
End of conversation
New conversation -
-
-
Implicit to make it more visible
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
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
-
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.
End of conversation
New conversation -
-
-
Good idea. Like Unsafe in Java, Cats and Rust. And everyone will need it all the time...
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.