What is delegation in julia?
问题 I see occational references to delegation, or the delegation design pattern in Julia. What is this? E.g. I see it mentioned in This file in DataStructures.jl 回答1: This is a form of polymorphism via composition (rather than inheritance) Say one has a wrapper type, wrapping some instance of a concrete subtype of AbstractT where the wrapper itself is intended to be a subtype of AbstractT (Not nesc always true, but in general). To add all the methods one exacts such a subtype of AbstractT to have