ãããªåºæºã§ã©ãããç¨èªã«ã¯èªä¿¡ããã¾ãã ã¯ã©ã¹(or å) X ã®ã¤ã³ã¹ã¿ã³ã¹ã Duck ã®ããã«æ¯ãèããããã¨ã⦠intrusiveï¼X ãå®ç¾©ããã¨ãã«ä¸ç·ã« "X 㯠Duck ã£ã½ã" ã¨æè¨ãã ä¾ï¼ class X implements Duck { ... } nonintrusive-explicitï¼ å¤ä»ã㧠"Xã¯Duckã£ã½ã" ã¨æè¨ãã ä¾ï¼ (ããå ´æã§) data X = ... (å¥ã®ã¨ããã§) instance Duck X where ... nonintrusive-implicit: æè¨ããªããæ®é duck typing ã¨è¨ãã¨ãããç¹ã« dynamic ãªãã®ãæãã ä¾ï¼ template<typename X> void foo(X x) { x.like_a_duck(); } dynamic: ç¹å®ã®ã¡ã½ãããæã£ãç°ãªã
{{#tags}}- {{label}}
{{/tags}}