ダック・タイピング
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/02/17 16:02 UTC 版)
ダック・タイピング(英: duck typing)とは、Smalltalk、Perl、PHP、Python、Ruby、JavaScriptなどの動的型付けに対応したオブジェクト指向プログラミング言語に特徴的な、型付けのスタイル(作法)のひとつである。ダック・タイピングはポリモーフィズム(多態性)を実現する手段のひとつとして使われる[1]。
注釈
- ^ nominalは名目的または記名的とも訳される。
出典
- ^ “Python Duck Typing - Example” (英語). Techie Hours (2020年6月28日). 2020年7月26日閲覧。
- ^ a b Python Software Foundation. “Glossary — Python 3.7.1 documentation, §duck-typing”. docs.python.org. 2018年11月8日閲覧。
- ^ Dynamic typing vs. static typing | Oracle
- ^ Benjamin C. Pierce「第15章 部分型付け」『型システム入門 −プログラミング言語と型の理論−』オーム社、2013年3月26日。ISBN 978-4274069116。
- ^ Objects and Aspects: Row Polymorphism | Neel Krishnaswami, Department of Computer Science, Carnegie Mellon University
- ^ 実例によるPureScript
- ^ OCamlで構築するモダンWeb:型付きHTML5プログラミングの実際 | 有限会社ITプランニング | 今井 敬吾
- ^ Benjamin C. Pierce「19.3 名前的型システムと構造的型システム」『型システム入門 −プログラミング言語と型の理論−』オーム社、2013年3月26日。ISBN 978-4274069116。
- ^ typingは「型付け」と訳されることが多いが、subclassingは「サブクラス化」と訳されることが多い。subtypingは「部分型付け」や「サブタイプ化」としてもよいかもしれないが、本記事ではduck typingを「ダック・タイピング」とカナ表記しているのでそれに準じることにする。
- ^ TypeScript: Documentation - Type Compatibility
- ^ Python Software Foundation. “Glossary — Python 3.10.1 documentation, §abstract base class”. docs.python.org. 2021年12月19日閲覧。
- ^ Kernel.#puts (Ruby 3.0.0 リファレンスマニュアル)
- ^ dynamic 型の使用 - C# プログラミング ガイド | Microsoft Docs
- ^ Differences Between C++ Templates and C# Generics - C# Programming Guide | Microsoft Docs
- ^ Object Variable Declaration - Visual Basic | Microsoft Docs
- ^ Early and Late Binding - Visual Basic | Microsoft Docs
- ^ Java Core Reflection
- ^ IDispatch Interface and Accessibility - Windows applications | Microsoft Docs
- ^ IDispatchEx Interface | Microsoft Docs
- 1 ダック・タイピングとは
- 2 ダック・タイピングの概要
- 3 概要
- 4 Rubyでの例
- 5 VB.NETでの例
- 6 その他の言語など
固有名詞の分類
- ダック・タイピングのページへのリンク