3 ms·
https://en.wikipedia.org/wiki/Region-based_memory_management#Region_inference https://en.wikipedia.org/wiki/Region-based_memory_management... You can infer whe
by thesz 7y ago
https://en.wikipedia.org/wiki/Region-based_memory_management#Region_inference https://en.wikipedia.org/wiki/Region-based_memory_management...
You can infer where you should allocate data. It was done 25 years ago.
The problem is that for complex programs you end with one big region and this is not useful.
Linear types that are visible to the user will not solve these problems. In fact, they will complicate things greatly, because you have to provide two functions for mapping, for example: for normal and linear types. And their mix with normal types is problematic at best.
The inference of linear operations in the backend, on the other hand, can be more efficient - you may end up using linear memory references not knowing about that.