Used in a Sentence

generics

Definition, parts of speech, synonyms, and sentence examples for generics.

Editorial note

An option would be to write a super-set of Go with generics that would compile to Go code.

Examples16
Definitions1
Parts of speech1

Quick take

(computing, programming) The use of templates, etc., to create generic source code that can be used in many situations.

Meaning at a glance

The clearest senses and uses of generics gathered in one view.

noun

(computing, programming) The use of templates, etc., to create generic source code that can be used in many situations.

Definitions

Core meanings and parts of speech for generics.

noun

(computing, programming) The use of templates, etc., to create generic source code that can be used in many situations.

Example sentences

1

An option would be to write a super-set of Go with generics that would compile to Go code.

2

I still miss generics, and it may be that the particular kinds of programming I do mean I miss them less than others.

3

Any generics solution has to have fast runtime, because they need to replace the builtin parametric slices and maps.

4

Russ Cox said this year that generics aren't left out because of political reasons or design choice.

5

One would have to implement generics, then spend several programmer-years tuning the compiler over various programs, compilers are complex machines.

6

These may add new features to the table, eg generics or union types or goroutines.

7

In practice, I don't think a generics language feature that captures how I program in Go is possible.

8

But I do think the former problem has little to do with generics as a language feature.

9

And they would be widely used, any good generics solution would have to replace maps and slices, and would permeate the standard library.

10

Achieving generic behaviour with interface and reflection is much more consistent than generics as we know from other languages.

11

Kotlin does not reify generics, and like in Java, that's a good thing!

12

I suspect if a good generics implementation came along though that argument would get pushed aside.

Quote examples

1

You shifted the argument from "generics are either bad for compile time or bad for performance, and therefore bad for Go" to "I don't need generics".

Proper noun examples

1

Generics are just a way for the compiler to automate the work that a programmer would otherwise have to do.

2

If anything is far less featureful and Algol-like than most of the other languages that have found a way to fit Generics.

3

Generics would codegen exactly the same way as slices and maps do now.

Frequently asked questions

Short answers drawn from the clearest meanings and examples for this word.

How do you use generics in a sentence?

An option would be to write a super-set of Go with generics that would compile to Go code.

What does generics mean?

(computing, programming) The use of templates, etc., to create generic source code that can be used in many situations.

What part of speech is generics?

generics is commonly used as noun.