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

13장 서브클래싱과 서브타이핑 #62

Open
lee-ji-hoon opened this issue Jul 23, 2023 · 1 comment
Open

13장 서브클래싱과 서브타이핑 #62

lee-ji-hoon opened this issue Jul 23, 2023 · 1 comment

Comments

@lee-ji-hoon
Copy link
Owner

No description provided.

@lee-ji-hoon lee-ji-hoon changed the title 서브클래싱과 서브타이핑 13장 서브클래싱과 서브타이핑 Jul 23, 2023
@ldh019 ldh019 mentioned this issue Aug 5, 2023
@lee-ji-hoon
Copy link
Owner Author

12장에서 말했던 내용중에 상속의 올바른 용도는 타입 계층을 구현하는 것이다 이 내용이 어렵다고 생각하고 있었는데 마침 13장에서 다시 복습겸 알려주는 내용이 좋았던거 같아.

특히 공감이 갔던 내용은 두 가지 후보 개념이 어떤 방식으로 사용되고 협력하는지 살펴본 후에 상속의 적용 여부를 결정해도 늦지 않는다. 이거인거 같아

그리고 고민이 좀 되는건 아래 내용이야

Q) 상속은 타입 계층을 구현할 수 있는 전통적인 방법이지만 유일한 방법은 아니다.   
상속을 사용하지 않고도 타입 계층을 구현할 수 있는 다양한 방법이 존재한다.

상속을 사용하지 않고도 타입 계층을 구현할 수 있는 다양한 방법이 존재한다는데 자바, 코틀린에서는 인터페이스 밖에 생각이 안나는데 다른 방법이 있을까?

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

No branches or pull requests

1 participant