Comment by ismailmaj

Comment by ismailmaj a day ago

2 replies

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

laserbeam a day ago

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.

throwawaymaths a day ago

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.