Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlinでのcompositionとdelegation #376

Open
yshrsmz opened this issue Aug 19, 2018 · 1 comment
Open

Kotlinでのcompositionとdelegation #376

yshrsmz opened this issue Aug 19, 2018 · 1 comment

Comments

@yshrsmz
Copy link
Member

yshrsmz commented Aug 19, 2018

https://proandroiddev.com/kotlin-composition-and-delegation-d1a387f8c158

@yshrsmz yshrsmz added the Kotlin label Aug 19, 2018
@yshrsmz yshrsmz added this to the 29-20180812-20180818 milestone Aug 19, 2018
@hkurokawa
Copy link

compositionでdelegationを使うのはとてもいいと思いますが、dataクラスはopenにできないから、という理由はちょっと不安になりました。また、そのあとのgetValue/setValueを実装するハックもやややり過ぎに見えました。SuperheroとPersonがis-a関係かどうか、ということを考えてinheritanceにするかcompositionにするか決める方がいいのではないでしょうか。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants