Comment by ismailmaj
The global io trick would totally be valid if you’re writing an application (i.e. not a library) and don’t have use of two different implementations of io
The global io trick would totally be valid if you’re writing an application (i.e. not a library) and don’t have use of two different implementations of io
you could still have a library-global io, let the user set it as desired.
> use of two different implementations of io
functionally rare situation.
There are plenty of libraries out there which require users to do an init() call of some sorts at startup. It is perfectly possible to design a library that only works with 1 io instance and gets it at init(). Whether people like or want that… I have no clue.