Join Slack
Powered by
What are some best practices to simulate "making a...
# getting-started
k
Kelvin Chung
08/06/2025, 10:56 PM
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
MattF
08/07/2025, 1:30 AM
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 {}
Open in Slack
Previous
Next