Skip to main content


Association for Computing Machinery at the University of South Carolina

Generics, Interfaces, and Polymorphism

ACM Discord

Joshua Nelson

A common feature of programming languages is generics, sometimes refered to as parameteric polymorphism. This allows for the same code to be used for many different types; this is often useful for writing collections like dynamically resized arrays and hash maps. In this talk, I'll discuss how generics are handled in various languages, including Java, C++, Python, and Rust. I'll also talk about interfaces, sometimes called traits or type classes, which are a way for generics to require certain properties from a type.

Update: the slides for this talk are available. This talk was also recorded on YouTube.