Join Slack
Powered by
I remember someone already proposed this some time...
# announcements
g
gildor
11/01/2018, 10:46 AM
I remember someone already proposed this some time ago as part of the language
e
elizarov
11/01/2018, 11:18 AM
That is called “type classes” :)
g
gildor
11/01/2018, 12:15 PM
No, I mean extend each data class implicitly from interface with component1..N method and have Component1, Component2 interfaces
gildor
11/01/2018, 12:18 PM
Yeah, found this proposal
https://kotlinlang.slack.com/archives/C0B9K7EP2/p1537101256000100
c
ckchen
11/02/2018, 2:27 AM
As I know the return type of componentN() for each data class is depending on the type of its corresponding property. How can we have a common interface of that?
g
gildor
11/02/2018, 2:34 AM
interface Component1<A>
,
interface Component2<A, B> : Component<A>
etc
2
Views
Open in Slack
Previous
Next