Wouldn't it be preferable to have the Delay interface not depend on java.util.concurrent.TimeUnit?
☝️ 1
e
elizarov
03/31/2017, 9:27 AM
That plan for js port of kotlinx.coroutines is to define
typealias TimeUnit=java.util.concurrent.TimeUnit
on JVM and have it implemented on JS via enum.
u
uli
03/31/2017, 1:44 PM
shouldnt tha change of signature on JVM be done as soon as possible
so that a later introduction for JS doesn't require a breaking change on the JVM
I mean, this type alias could be put in place right now (i.e. 0.15)
wait, i guess the typealias needs to go into stdlib, not coroutine lib, right?then please ignore my reference to 0.15 🙂
To understand that right, will there be different kotlinx-coroutines-core libraries for JVM and JS? Or do you mean stdlib will get a TimeUnit typealias?
e
elizarov
04/04/2017, 2:46 PM
First. Different core lib for JVM and JS.
Maybe stblib will get this typealias in the future, too.
u
uli
04/04/2017, 4:48 PM
Great. If the type def goes to the core lib, you could provide it soon without breaking anything but enabling people to write more future-proof code. You get my vote on this 🙂