Skip to main content

Class Hierarchies

  • Chapter
  • First Online:
  • 3370 Accesses

Abstract

There is more to polymorphism than merely abstract data types that can have different concrete implementations. A fundamental concept found in most object-oriented programming languages is classes and class hierarchies. Class hierarchies serve two conceptually different purposes: refinement of object interfaces and code reuse. Neither concept, strictly speaking, requires class hierarchies in R, since R is dynamically typed, unlike programming languages such as C++ or Java where class hierarchies and the static type system are intertwined. Nevertheless, class hierarchies provide a framework for thinking about software design that is immensely useful, not least in dynamically typed languages.

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

Buying options

eBook
USD   19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   29.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

Learn about institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Thomas Mailund

About this chapter

Cite this chapter

Mailund, T. (2017). Class Hierarchies. In: Advanced Object-Oriented Programming in R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2919-4_2

Download citation

Publish with us

Policies and ethics