2 ms·
Linear types guarantee at compile time that you can use each value only and exactly once--so no use after free errors, no memory leaks.
by yawaramin 10y ago
Linear types guarantee at compile time that you can use each value only and exactly once--so no use after free errors, no memory leaks.
- mamcx 10y agoOk, and know that is not possible with normal types and follow the flow?
- tel 10y agoNo, as it turns out in presence of recursion it's undecidable to know that in general. Inference in a linear logic system can answer when it's possible some of the time. Programmer-written annotations can assert it's the case. Type-checkers can ensure that assertions actually hold.