blog.yoshuawuyts.com · 1d · discuss
IntroductionLinear types are types whose values must be used exactly once, in all branches a program can take. To be “used” here means “used by some operation”, for example by passing, returning, storing, or destroying the value. This is as opposed to not being used in an operation, which in a stack language would be akin to the value being popped off the stack.1 1To expand on this: linear types are types which in the substructural types framework allow for “exchange”, but not “weakening” or “contraction”. In a stack language, this allows linear values to be reordered, but not freely...