Use of Abstract Types
Abstract types are an important feature in statically typed OO languages. Many dynamically typed languages have no equivalent feature (although the use of duck typing makes abstract types unnecessary); however traits are found in some modern dynamically-typed languages.
Some authors argue that classes should be leaf classes (have no subtypes), or else be abstract.
Abstract types are useful in that they can be used to define and enforce a protocol; a set of operations which all objects that implement the protocol must support.
Read more about this topic: Abstract Type
Famous quotes containing the words abstract and/or types:
“If the abstract rights of man will bear discussion and explanation, those of women, by a parity of reasoning, will not shrink from the same test: though a different opinion prevails in this country.”
—Mary Wollstonecraft (17591797)
“The rank and file have let their servants become their masters and dictators.... Provision should be made in all union constitutions for the recall of leaders. Big salaries should not be paid. Career hunters should be driven out, as well as leaders who use labor for political ends. These types are menaces to the advancement of labor.”
—Mother Jones (18301930)