O'Reilly logo

Modern Compiler Implementation in C by Maia Ginsburg, Andrew W. Appel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16

Polymorphic Types

poly-mor-phic: able to assume different forms

Webster’s Dictionary

Some functions execute in a way that’s independent of the data type on which they operate. Some data structures are structured in the same way regardless of the types of their elements.

As an example, consider a function to concatenate linked lists in Tiger. We first define a linked-list data type, and then an append function:

image

There’s nothing about the code for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required