generic
- noun
- /dʒəˈnɛrɪk/
- Specialized
- In programming, a generic allows us to create functions that can handle data of various types safely.
But there was no there was no syntax for defining generics directly syntactically in the language.
- But there was no there was no syntax for defining generics directly syntactically in the language.
Examples
-
Using a generic in our class means we can implement the same logic for both integers and strings.
-
The generic we defined can work with multiple data types, improving the flexibility of our code.
-
In fact, this step function here is just a generic step function.
-
So let's write out a generic form of this type.
-
But you don't have to write a generic script.
-
So we'll use that generic variable to denote any of those.
-
And so if this here is some generic fatty acyl COA.
-
O let's just go ahead and sketch a generic set of XY axes.
Compounds
- Specialized
A medicine that has the same dose and effect as a brand-name medicine but costs less
- Specialized
A wine not allowed to show its place or grape and sold under a simple name such as red
How General
Surface Forms
Etymology
Generic (in programming) comes from the Latin genus, meaning 'kind' or 'type', so a generic class or function is made to work with many types or kinds of data. That's why one generic piece of code can handle different kinds of items.