3 ms·
We use affine types, which means every value can get used at most once. This is a lot less painful in practice than it sounds though, since: a. we can copy thi
by johnburnham 7y ago
We use affine types, which means every value can get used at most once. This is a lot less painful in practice than it sounds though, since:
a. we can copy things for free at compile-time that get erased at runtime
b. we have a `cpy` primitive that allows for free copying of our Word type (a 32-bit unsigned int)
c. we have a primitive that allows for deep-copying, as long as the copies (and anything that uses them) are marked with usage annotations https://docs.formality-lang.org/en/latest/language/4.Core-Features.html#boxes-and-copying https://docs.formality-lang.org/en/latest/language/4.Core-Fe...