Polymorphism (computer science)
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]
https://en.wikipedia.org/wiki/Polymorphism_(computer_science)
Polymorphism (computer science)的更多相关文章
- Discovering the Computer Science Behind Postgres Indexes
This is the last in a series of Postgres posts that Pat Shaughnessy wrote based on his presentation ...
- [转载] A set of top Computer Science blogs
This started out as a list of top Computer Science blogs, but it more closely resembles a set: the o ...
- Computer Science Theory for the Information Age-4: 一些机器学习算法的简介
一些机器学习算法的简介 本节开始,介绍<Computer Science Theory for the Information Age>一书中第六章(这里先暂时跳过第三章),主要涉及学习以 ...
- Computer Science Theory for the Information Age-1: 高维空间中的球体
高维空间中的球体 注:此系列随笔是我在阅读图灵奖获得者John Hopcroft的最新书籍<Computer Science Theory for the Information Age> ...
- Intro to Computer Science Class Online (CS101) - Udacity
Intro to Computer Science Class Online (CS101) - Udacity Building a Search Engine
- MIT Introduction to Computer Science and Programming (Lesson one )
MIT Introduction to Computer Science and Programming (Lesson one ) 这篇文是记载 MIT 计算机科学及编程导论 第一集 的笔记 Les ...
- CSCI 1100 — Computer Science 1 Homework
CSCI 1100 — Computer Science 1 Homework 8CS1 Multiverse: ClassesOverviewThis homework is worth 100 p ...
- How do you explain Machine Learning and Data Mining to non Computer Science people?
How do you explain Machine Learning and Data Mining to non Computer Science people? Pararth Shah, ...
- Mathematics for Computer Science (Eric Lehman / F Thomson Leighton / Albert R Meyer 著)
I Proofs1 What is a Proof?2 The Well Ordering Principle3 Logical Formulas4 Mathematical Data Types5 ...
随机推荐
- fzu 2129
第i个元素a未出现过:dp[i] = (2 * dp[i-1] + 1) % mod; visit[a]代表a最后出现的位置 第i个元素a出现过:dp[i] = (2 * dp[i-1] - dp[v ...
- hdu_1003_Max Sum_201311271630
Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Su ...
- Clojure:从Java调用Clojure
我们要在Java中调用Clojure有两种方法,一种是将Clojure代码生成class文件,另外一种是通过Clojure RT方式直接在java程序中调用Clojure代码.两种方式各有优缺点, 第 ...
- Android 开发 ContentProvider 获取歌曲列表和联系人的样例
ContentProvider(内容提供者)是Android中的四大组件之中的一个. 主要用于对外共享数据.也就是通过ContentProvider把应用中的数据共享给其它应用訪问.其它应用能够通过C ...
- poj和hdu部分基础算法分类及难度排序
最近想从头开始刷点基础些的题,正好有个网站有关于各大oj的题目分类(http://www.pythontip.com/acm/problemCategory),所以写了点脚本把hdu和poj的一些题目 ...
- 使用同步适配器(sync adapter)数据传输
在android设备与webserver之间实现数据同步能显著提高你的应用的有用性.让你的应用更受用户的欢迎. 比方说.你的数据上传给webserver,这就有了一个有用的备份.当用户的设备离线工作时 ...
- luogu1631 序列合并
题目大意 有两个序列A,B,在A和B中各取一个数相加能得到$n^2$个和.求出这些和前n小的数字. 题解 首先这道题不可以用自己想的什么A序列B序列各两个指针的自己发明的模拟算法,用这样的算法只能是绝 ...
- MTK camera 闪光灯Flashlight驱动调试流程
MTK camera 闪光灯Flashlight驱动调试流程 分类: MtkDev | 作者: topicdev 相关 | 发布日期 : 2014-09-26 | 热度 : 153° ...
- Find Minimum in Rotated Sorted Array 典型二分查找
https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/ Suppose a sorted array is rot ...
- Django day14(二) Session
Session 1. Session干什么用的? 解决cookie不安全的问题, 2. 原理是: 1) 存在服务器上的键值对{'sdaf随机字符串':{name:prince,pwd:123}} 2 ...