翻訳 第1章 : Polymorphism (computer science) - Wikipedia
In programming languages and type theory, polymorphism (from Greek πολύς, polys, "many, much" and μορφή, morphē, "form, shape") is the provision of a single interface to entities of different types.[1] A polymorphic type is one whose operations can also be applied to values of some other type, or types.[2] There are several fundamentally different kinds of polymorphism:
プログラミング言語と型理論では、ポリモルフィズム(ポリは「多く」、モーフは「形」を意味するギリシャ語)は異なる型のエンティティへの一つのインターフェースの提供である。ポリモルフィズム型とはその操作が他の型の値にもまた適用できるものである。ポリモルフィズムには根本的に異なるいくつかの種類がある。
- Ad hoc polymorphism: when a function has different implementations depending on a limited range of individually specified types and combinations. Ad hoc polymorphism is supported in many languages using function overloading.
アドホックポリモルフィズム:関数が個々の明示された型や結合の限られた範囲に依存した異なる実装。アドホックポリモルフィズムは関数のオーバーロードを使う多くの言語でサポートされている - Parametric polymorphism: when code is written without mention of any specific type and thus can be used transparently with any number of new types. In the object-oriented programming community, this is often known as generics or generic programming. In the functional programming community, this is often shortened to polymorphism.
パラメトリックポリモルフィズム:コードが明示された型の言及なく書かれ、それゆえ多くの新しい型と一緒にすっきりと使われうる。オブジェクト指向プログラミングコミュニティでは、これはしばしばジェレリクスやジェネリックプログラミングとして知られる。 - Subtyping (also called subtype polymorphism or inclusion polymorphism): when a name denotes instances of many different classes related by some common superclass.[3]
サブタイピング(サブタイプポリモルフィズムや包含ポリモルフィズムともよばれる):名前が共通のスーパークラスによって関連付けられた多くの異なるクラスのインスタンスを指す。
The interaction between parametric polymorphism and subtyping leads to the concepts of variance and bounded quantification.
パラメトリックポリモルフィズムとサブタイピングの間の相互作用に相違や束縛量化の概念が導かれる。
1 History
Ad hoc polymorphism and parametric polymorphism were originally described in Fundamental Concepts in Programming Languages, a set of lecture notes written in 1967 by British computer scientist Christopher Strachey.[4] In a 1985 paper, Peter Wegner and Luca Cardelli introduced the term inclusion polymorphism to model subtypes and inheritance.[2] However, implementations of subtyping and inheritance predate the term "inclusion polymorphism", having appeared with Simula in 1967.
アドホックポリモルフィズムとパラメトリックポリモルフィズムはもともとイギリスの科学者であるChristopher Stracheyによって1967年に作られた講義資料のFundamental Concepts in Programming Languagesで説明された。1985年のペーパーで、Peter Wegner と Luca Cardelliは包含ポリモルフィズムの語句をサブタイプと継承のモデルへ導入した。しかしながら、サブタイプと継承の実装は1967年にSimulaで現れた「包含ポリモルフィズム」の前に現れた。
- この記事はクリエイティブ・コモンズ・表示・継承ライセンス3.0の下で公表されたウィキペディアの項目Polymorphism (computer science) - Wikipediaを素材として英語から日本語に翻訳するという形で二次利用しています。
- Wikipedia内の画像は必ずしもクリエイティブコモンズの下で公表されているとは限らないため基本的にこの記事へ引用していません。
- この記事のテキストはクリエイティブ・コモンズ・表示・継承ライセンス3.0の下で利用可能です。
- この記事は、コンピュータサイエンスに関する技術および英語についての正確な知識のない翻訳者が個人的な勉強を目的として、ほぼ全てを意訳によって翻訳したために、極めて多くの誤訳が含まれていると想定される決して質が高いとは言えない文章を公開しているものです。ここに掲載されている情報を使用したことによる、読者の方または第三者に生じる損害および損失について、翻訳者は一切の責任を負いません。正しい情報が必要な場合は原文を参照してください。