Lably
Skip to content

Generic function

  • 4 min read
  • 3 chapters

Related on Lably

Through Computer programming, Polymorphism (computer science) and Java (programming language)

In statically typed languages

In statically typed languages (such as C++ and Java), the term generic functions refers to a mechanism for compile-time polymorphism (static dispatch), specifically parametric polymorphism. These are functions defined with TypeParameters, intended to be resolved with compile time type information. The compiler uses these types to instantiate suitable versions, resolving any function overloading appropriately.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication