A comparison of generic template support: ada, C++, C#, and javaTM

  • Authors:
  • Benjamin M. Brosgol

  • Affiliations:
  • AdaCore, New York NY

  • Venue:
  • Ada-Europe'10 Proceedings of the 15th Ada-Europe international conference on Reliable Software Technologies
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Generics (also known as templates) have become a standard feature of modern programming languages, offering parameterization by data types and possibly other entities. Generics support efficient type-safe container data structures, general-purpose algorithms, and other reusable components. However, the approaches in different languages vary widely in syntax, semantics, and usage. This paper summarizes the design of generics in Ada, C++, C#, and Java and compares them with respect to expressiveness, implementation model / run-time efficiency, and interaction with object-oriented programming and other features.