Parametric polymorphism is a way to make a language more expressive, while still m aintaining full static type-safety. Subtyping or subtype polymorphism is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability, meaning that program constructs, typically subroutines or functions, written to operate on elements of the supertype can also operate on elements of the subtype. Common to these two types is the fact that the programmer has to specify exactly what types are to be usable with the polymorphic function. Sebelum baca ke bawah nih, udah kenal sama polimorfism? Polimorfism itu adalah kemampuan class untuk menyembunyikan implementasi yang berbeda dalam interface yang sama.Īd-hoc polymorphism usually refers to simple overloading, but sometimes automatic type conversion, known as coercion, is also considered to be a kind of ad-hoc polymorphism. gw mencoba mencari arti-arti dari beberapa istilah polimorfism
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |