X hits on this document

182 views

0 shares

0 downloads

0 comments

11 / 62

11

Structural Equivalence

The same components, put together the same way = same type

Algol-68, early Pascal, C (with exceptions)

And ML, somewhat

Straightforward and easy to implement

Definition varies from lang to lang

eg. Does the ORDER of the fields matter?

Back to example: are they the same?

struct student { string name; string address;}

struct school  { string name; string address;}

Yes, they are (with structural equivalence)

Document info
Document views182
Page views182
Page last viewedSun Dec 11 06:24:31 UTC 2016
Pages62
Paragraphs993
Words3163

Comments