Duck typing 과 Nominative typing, Structure typing
타이핑 방식은 ‘타입이 같은가’, ‘타입이 호환가능한가’ 를 체크하기 위한 방식이다. 이러한 타이핑 방식에는 Nominative typing, Structure typing 방식이 있다. 그리고 내가 주로 사용하는 파이썬에서 매우 자주 사용되는 Duck typing 까지 살펴보고자 한다. Nominative typing (명시적 타이핑) In computer science, a type system is a nominal or nominative type system (or name-based type system) if compatibility and equivalence of data types is determined by explicit declarations and/or the name of t..
개발/python-객체지향프로그래밍(OOP)
2022. 5. 25. 23:49