What are some best practices to simulate "making a...
# getting-started
k
What are some best practices to simulate "making a third-party type conform to a third-party interface"? For example, suppose I have a third-party interface called
Binary32
that I want
Float
to somehow implement. What's the best way to emulate that?
m
can you use delegation (https://kotlinlang.org/docs/delegation.html) for this? Perhaps something like this (untested):
Copy code
class MyFloat(k: Float) : Binary32 by k {}