4 ms·
> I am also not sure It felt like a question more than a complaint. > create an interface that can be implemented by both suspending and synchronous functions
by ackfoobar 4y ago
> I am also not sure
It felt like a question more than a complaint.
> create an interface that can be implemented by both suspending and synchronous functions
If interface has a suspending method, the implementations will also be suspending.
But you can choose not to make any suspend calls in the method body.
Not being able to say "this particular implementation of a red interface is blue" has never bothered me.
- vips7L 4y agoI guess my complaint is that it doesn’t work with object oriented programming. It’s the same reason why I don’t like checked exceptions, checked nulls, or Result types.