{"published":"2010-10-19 16:01:37","title":" Scala\u3067Boost.Interfaces\u7684\u306a\u3053\u3068\u3002","author_name":"faith_and_brave","author_url":"https://blog.hatena.ne.jp/faith_and_brave/","version":"1.0","provider_url":"https://hatena.blog","blog_title":"Faith and Brave - C++\u3067\u904a\u307c\u3046","url":"https://faithandbrave.hateblo.jp/entry/20101019/1287471697","type":"rich","image_url":null,"blog_url":"https://faithandbrave.hateblo.jp/","description":"Structual Subtyping\u3067\u3001\u7d99\u627f\u95a2\u4fc2\u304c\u306a\u3044draw\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3063\u3066\u3044\u308b\u30af\u30e9\u30b9\u3092\u306a\u3093\u3067\u3082\u5165\u308c\u3089\u308c\u308b\u30ea\u30b9\u30c8\u3002 class Rectangle { def draw = println(\"Rectangle\") } class Circle { def draw = println(\"Circle\") } object Main { def main(args: Array[String]) { type Drawable = { def draw: Unit } val ls = List[Drawable](new Rectangle, new Circle) ls fore\u2026","categories":["Scala"],"height":"190","provider_name":"Hatena Blog","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F20101019%2F1287471697\" title=\" Scala\u3067Boost.Interfaces\u7684\u306a\u3053\u3068\u3002 - Faith and Brave - C++\u3067\u904a\u307c\u3046\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}