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:
“Rights! There are no rights whatever without corresponding duties. Look at the history of the growth of our constitution, and you will see that our ancestors never upon any occasion stated, as a ground for claiming any of their privileges, an abstract right inherent in themselves; you will nowhere in our parliamentary records find the miserable sophism of the Rights of Man.”
—Samuel Taylor Coleridge (17721834)
“Hes one of those know-it-all types that, if you flatter the wig off him, he chatter like a goony bird at mating time.”
—Michael Blankfort. Lewis Milestone. Johnson (Reginald Gardner)