Skip to content

Clarification on type rolling and unrolling #578

Answered by rossberg
CharlieTap asked this question in Q&A
Discussion options

You must be logged in to vote

It may be useful to think of it in terms of the difference between "syntactic" types, as they appear in the source program, and "semantic" types, which are used in most of the semantics (validation, linking, execution).

Syntactic types contain type indices from a module's type index space. Since these are module-local, they are not generally meaningful in any context where types can flow outside their original module, or where types from different modules mix, which is everywhere but validation. Hence, in the spec (and the interpreter), all original type indices are substituted away ("closed") before their use at link time or run time.

Validation is a bit different. While the types in the…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by CharlieTap
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants