On Friday, 19 November 2021 at 15:46:15 UTC, Tejas wrote:
>On Friday, 19 November 2021 at 15:37:04 UTC, Paulo Pinto wrote:
>On Friday, 19 November 2021 at 15:20:06 UTC, IGotD- wrote:
>[...]
That would be affine/linear types, the best ergonomics for them is to combine a tracing GC, with such types.
Instead of having them all around the program, only make use of them when performance requirements so demand them.
This is the approach being taken by Swift, Haskell, OCaml, and even D with @life.
It would be interesting to see @life + GC settle all discussions on D's approach to memory management, but somehow I feel it won't happen.
What do you think about Nim's ARC + GC solution? They call it ORC :
https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
It is an old idea that goes back to systems like Mesa/Cedar in the early 1980's.
https://archive.org/details/bitsavers_xeroxparctddingGarbageCollectionandRuntimeTypestoa_1765837
Used to create this workstation OS at Xerox PARC,