▁polym orphism ▁generic ▁programming . ▁The ▁type - the or etic ▁found ations ▁of ▁polym orphism ▁are ▁closely ▁related ▁to ▁those ▁of ▁abstra ction , ▁mod ular ity ▁and ▁( in ▁some ▁cases ) ▁sub ty ping . ▁ ▁D uck ▁typing ▁▁ ▁In ▁du ck ▁typing , ▁a ▁statement ▁calling ▁a ▁method ▁m ▁on ▁an ▁object ▁does ▁not ▁rely ▁on ▁the ▁declared ▁type ▁of ▁the ▁object ; ▁only ▁that ▁the ▁object , ▁of ▁whatever ▁type , ▁must ▁supply ▁an ▁implementation ▁of ▁the ▁method ▁called , ▁when ▁called , ▁at ▁run - time . ▁ ▁D uck ▁typing ▁diff ers ▁from ▁struct ural ▁typing ▁in ▁that , ▁if ▁the ▁part ▁( of ▁the ▁whole ▁module ▁structure ) ▁needed ▁for ▁a ▁given ▁local ▁computation ▁is ▁present ▁at ▁runtime , ▁the ▁du ck ▁type ▁system ▁is ▁satisfied ▁in ▁its ▁type ▁identity ▁analysis . ▁On ▁the ▁other ▁hand , ▁a ▁struct ural ▁type ▁system ▁would ▁require ▁the ▁analysis ▁of ▁the ▁whole ▁module ▁structure ▁at ▁compile ▁time ▁to ▁determine ▁type ▁identity ▁or ▁type ▁dependence . ▁ ▁D uck ▁typing ▁diff ers ▁from ▁a ▁nomin ative ▁type ▁system ▁in ▁a ▁number ▁of ▁aspects . ▁The ▁most ▁prominent ▁ones ▁are ▁that ▁for ▁du ck ▁typing , ▁type ▁information ▁is ▁determined ▁at ▁runtime ▁( as ▁contrast ed ▁to ▁compile ▁time ), ▁and ▁the ▁name ▁of ▁the ▁type ▁is ▁irrelevant ▁to ▁determine ▁type ▁identity ▁or ▁type ▁dependence ; ▁only ▁partial ▁structure ▁information ▁is ▁required ▁for ▁that ▁for ▁a ▁given ▁point ▁in ▁the ▁program ▁execution . ▁ ▁D uck ▁typing ▁uses ▁the