문서 편집 권한이 없습니다. 다음 이유를 확인해주세요: 요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다: 사용자. 문서의 원본을 보거나 복사할 수 있습니다. [[분류:프로그래밍]] [[분류:Rust]] [https://stackoverflow.com/questions/28632968/why-doesnt-rust-support-trait-object-upcasting 이 토픽]에서 발견한 내용입니다. 참고로 러스트는 객체 지향 언어가 아니야<ref>As a side note: Rust is not object-oriented language</ref> Trait은 인터페이스가 아니고 하스켈에서 유래된 타입 클래스와 더 유사해<ref>Traits are not interfaces, they are more like type classes from haskell.</ref>. 러스트는 그렇기에 서브타입을 가지지 않고, [[wikipedia:Liskov_substitution_principle|LSP]]는 서브 타입의 관계에 대한 정의이기 때문에 러스트에 적용될 수 없어.<ref>Rust also does not have subtyping, so LSP is somewhat inapplicable to it because its definition is tied to the subtyping relationship</ref> --Vladimir Matveev 물론 내가 말한대로 러스트는 다양한 객체지향 스타일의 추상화를 지원하고 trait은 상속을 허용하여 타입 계층과 유사한 것을 구성하지.<ref>Still, as I said, Rust supports a lot of OO-style abstractions, and traits are allowed to inherit, forming something akin to a type hierarchy</ref> 내게 있어서 객체지향이 러스트의 주요 패러다임이 아니더라도 자연스럽게 trait 객체가 LSP를 지원하는 것처럼 보여.<ref>For me, it would seem natural to support LSP for trait objects, even if OO isn't the main paradigm of the language.</ref> Rust는 객체지향 언어가 아니다. 문서로 돌아갑니다.