<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bingo_nakanishi_perl</author_name>
  <author_url>https://blog.hatena.ne.jp/bingo_nakanishi_perl/</author_url>
  <blog_title>bingo_nakanishiの他言語出身者のためのPerl入門</blog_title>
  <blog_url>https://bingo-nakanishi-perl.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>前回は、Perlで書いたのだけど、 Rubyでも書いてみたので載せます。 動的型付け言語と静的型付け言語における多態性 オブジェクト指向では、多態性（ポリモーフィズム）という発想がでてくる。 この多態性を実現する方法を今回は2つ紹介する。Rubyは動的型付け言語であり、ダックタイピングという手法で、多態性を実現できる。 対して、静的型付け言語であるJavaでは上位の型を作ることで多態性を実現できる（今回はインタフェースを用いてみた）。 ダックタイピング Rubyでのタックタイピングを見てみよう。 human = Human.new dog = Dog.new duck = Duck.new h…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbingo-nakanishi-perl.hatenadiary.org%2Fentry%2F20090627%2F1246108499&quot; title=&quot;第127回 Ruby vs Java　ダックタイピングとインタフェースで見る多態性 - bingo_nakanishiの他言語出身者のためのPerl入門&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-06-27 22:14:59</published>
  <title>第127回 Ruby vs Java　ダックタイピングとインタフェースで見る多態性</title>
  <type>rich</type>
  <url>https://bingo-nakanishi-perl.hatenadiary.org/entry/20090627/1246108499</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
