4 ms·
> Are there are books/video lectures that explain linear types how they are useful in a programming language? Just to throw out an example of how they are use
by ivanbakel 6y ago
> Are there are books/video lectures that explain linear types how they are useful in a programming language?
Just to throw out an example of how they are useful: loads of Ethereum contracts (e.g. every ERC20 variant) track a kind of private assets (tokens). A big class of bugs is double-spend or double-store of these assets, since any instance of that kind of behaviour completely invalidates the contract.
As it turns out, linear types[0] are just the tool to prevent those bugs.
[0]: https://github.com/flintlang/flint/blob/master/proposals/0001-asset-trait.md https://github.com/flintlang/flint/blob/master/proposals/000...