X hits on this document

234 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 views234
Page views234
Page last viewedFri Jan 20 00:27:24 UTC 2017
Pages62
Paragraphs993
Words3163

Comments