Chapter 7. Generics
The definition of generic, as found in Merriam-Webster’s Collegiate Dictionary, is "of a whole genus, kind, class, etc.; general; inclusive." Based on this definition, a person is generic, whereas Donis Marshall is quite specific. City is generic, whereas Seattle is specific. More specific to programming, a data algorithm is generic, whereas the implementation is specific. A stack is generic, whereas a stack of integers is specific. A spreadsheet is generic, whereas a spreadsheet of strings is specific.
In the Microsoft .NET Framework, an implementation of a class or structure is specific. A StackInt class is a specific type and a specialization of the stack pattern, which targets integers. A stack of strings or floats would ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access