You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to recommend avoiding using "global" state in the libraries, that later is almost impossible to test and/or mock.
We tend to favor explicitly spelled-out APIs for the such state: datetime's Clock.System.now(), Okio's FileSystem.DEFAULT.read* as opposed to top-level now(), read(path) etc. (the most notable existing API that falls into this trap is coroutine's Dispatchers.Default)
The text was updated successfully, but these errors were encountered:
It would be nice to recommend avoiding using "global" state in the libraries, that later is almost impossible to test and/or mock.
We tend to favor explicitly spelled-out APIs for the such state: datetime's
Clock.System.now()
, Okio'sFileSystem.DEFAULT.read*
as opposed to top-levelnow()
,read(path)
etc. (the most notable existing API that falls into this trap is coroutine'sDispatchers.Default
)The text was updated successfully, but these errors were encountered: