Skip to main content

A Comparison of Generic Template Support: Ada, C++, C#, and JavaTM

  • Conference paper
Reliable Software Technologiey – Ada-Europe 2010 (Ada-Europe 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6106))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Liskov, B., et al.: CLU Reference Manual. Springer, Heidelberg (1983)

    Google Scholar 

  2. Wulf, W.A., London, R.L., Shaw, M.: Abstraction and verification in Alphard: Introduction to language and methodology. USC Information Sciences Institute (1976)

    Google Scholar 

  3. ISO/IEC JTC1/SC 22/WG 9. Ada Reference Manual – ISO/IEC 8652:2007(E) with Technical Corrigendum 1 and Amendment 1 – Language and Standard Libraries (2007)

    Google Scholar 

  4. International Organization for Standardization. ISO/IEC 14882:2003, The C++ Standard Incorporating Technical Corrigendum 1 (2003)

    Google Scholar 

  5. Ecma International. C# Language Specification – ECMA-334, 4th edn. (June 2006)

    Google Scholar 

  6. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley, Reading (2005)

    Google Scholar 

  7. Brosgol, B.M.: Companion Examples: A Comparison of Generic Template Support (November 2009), http://www1.adacore.com/~brosgol/ae2010/examples.html

  8. Garcia, R., et al.: A comparative study of language support for generic programming. In: Proc. OOPSLA 2003. ACM, New York (2003)

    Google Scholar 

  9. Khalifa, A.A.: Generics: Ada 95 vs C++ vs Java 1.5. Master’s thesis, Univ. of Jyväskylä, Finland (2005), https://jyx.jyu.fi/dspace/handle/123456789/12351?show=full

  10. Ichbiah, J.D., Barnes, J.G.P., Firth, R.J., Woodger, M.: Rationale for the Design of the Ada Programming Language (1983)

    Google Scholar 

  11. Bray, G.: Implementation implications of Ada generics. ACM SIGAda Ada Letters III(2) (1983)

    Google Scholar 

  12. Stroustrup, B.: The Design and Evolution of C++. Addison-Wesley, Reading (1995)

    Google Scholar 

  13. Vandevoorde, D., Josuttis, N.M.: C++ Templates: The Complete Guide. Addison-Wesley, Reading (2007)

    Google Scholar 

  14. Naftalin, M., Wadler, P.: Java Generics and Collections. O’Reilly, Sebastopol (2007)

    Google Scholar 

  15. Flanagan, D.: Java in a Nutshell, 5th edn. O’Reilly, Sebastopol (2005)

    Google Scholar 

  16. Arnold, K., Gosling, J., Holmes, D.: The Java Programming Language, 4th edn. Addison-Wesley, Reading (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Brosgol, B.M. (2010). A Comparison of Generic Template Support: Ada, C++, C#, and JavaTM . In: Real, J., Vardanega, T. (eds) Reliable Software Technologiey – Ada-Europe 2010. Ada-Europe 2010. Lecture Notes in Computer Science, vol 6106. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13550-7_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13550-7_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13549-1

  • Online ISBN: 978-3-642-13550-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics